Open gilch opened 6 months ago
There are two files where font_family is set: enso/quasimode/layout.py enso/messages/primarywindow.py
It is worth to experiment with them.
It turns out that the font is hardcoded here. It is possible to specify any font file there. I'll try to do something about this in the future versions.
That would be nice to have different fonts. I am also missing a lot of Unicode characters.
I've added the UI_FONT variable in the recent release. It is possible to specify a font here. In Enso it is only possible to use different fonts for message windows and the main UI window. Currently it is possible to only specify only one font for both. If you mean a feautre that assumes a custom font for a part of a message, it is very hard to do this, because a layout engine of some sort should be created, so most likely it will never be done, because everything is rendered in plain Cairo. It should be investigated how Cairo renders glyphs and are there settings to render unicode properly.
Great, thank you. It would be interesting to try out some new fonts.
I have a script that uses Unicode. Some characters show up and others don't. Do not know anything about Cairo but it would be a cool feature. symbol.zip
If you mean a feautre that assumes a custom font for a part of a message,
Not sure what was meant, but in fact, no font I know of covers all Unicode glyphs. One can get pretty far with GNU Unifont, which at least covers the basic multilingual plane, but it's a kinda ugly pixel font and even then doesn't handle combining characters properly in many cases. Full Unicode display support requires inline rendering of fallback fonts.
so most likely it will never be done, because everything is rendered in plain Cairo.
This Cairo? They specifically call out and recommend Pango at that FAQ link as being able to handle multiple fonts. No need to reinvent the wheel, but I can't tell if that's easy to apply to Enso because I still don't understand Enso's internals.
A quick search of the repository does contain hits for "pango", so maybe it's already being used.
I've added the UI_FONT variable in the recent release. It is possible to specify a font here. In Enso it is only possible to use different fonts for message windows and the main UI window. Currently it is possible to only specify only one font for both. If you mean a feautre that assumes a custom font for a part of a message, it is very hard to do this, because a layout engine of some sort should be created, so most likely it will never be done, because everything is rendered in plain Cairo. It should be investigated how Cairo renders glyphs and are there settings to render unicode properly.
So I 've downloaded the new version but I do not know how to change to font. Where do I do this?
There is a text input in the main settings window. It is necessary to specify font there:
UI_FONT="Segoe UI"
and restart Enso.
Alright, I got the message windows of enso working with another font but not the part where you type after launching enso. Is this possible?
It is set here. You may check if it is so in your installation (probably it is). It sets the font of the string that you type and the automatic completion. The help string above this may be in the standard font.
Thanks, I have got it working. This is so cool.
Some of my custom commands insert Unicode characters that are otherwise hard to type. Sometimes I might want to display a message, write a docstring, or use a BOUND ARG option containing Unicode characters. Not all of them render in Enso's default font.