ii8 / havoc

minimal terminal emulator for wayland
Other
103 stars 17 forks source link

CJK font support #53

Closed debeetle closed 1 month ago

debeetle commented 1 month ago

Hi again! I found CJK font cannot show correctly in this minimal terminal, is there possible to add this feature? Any advice will be appreciated.

ii8 commented 1 month ago

Havoc supports double width characters, but it has to be a monospace font, which font is causing problems?

debeetle commented 1 month ago

Thank you for your time. It's WenQuanYi Zen Hei, a widely-used CJK font. And it's not a mono font, so I guess it's the problem. Changing the font to WenQuanYi Zen Hei Mono in /etc/fonts/local.conf and reboot does not work. Am I making any mistake?

ii8 commented 1 month ago

The font is specified in the havoc.cfg file. See here: https://github.com/ii8/havoc/blob/9b17b655b3173d08e446b665c20f2fe0fe6da3a1/havoc.cfg#L27-L28

Also you never need to reboot for any config change to take effect. You can just restart havoc.

debeetle commented 1 month ago

In cfg file I set ubuntu mono which does not support cjk. I thought havoc would automatically roll back to local cjk font settings without specifying . And it seems that there can only exist one font in config. Is it possible to set a font for english while another for cjk? Thanks for replying!

ii8 commented 1 month ago

You can't set multiple fonts at the moment, that's a feature that could be added alongside specifying a separate font for bold text. Or for now you could use fontforge to merge the two fonts into one.

debeetle commented 1 month ago

That's helpful, I'll close this issue