The parsing is trivial: find the first :, what is on the LHS is the font name, on the RHS is the font size. The font name is then directly passed to the Evas_Textblock.
Turns out that things are not that pretty in real life, as it is possible to specify fonts with great details with fontconfig. And Evas_Textblock actually parses the font as fontconfig formats.
See the fontconfig user manual for details.
So instead of having our own minimal format above, we should just use the fontconfig spec. We just need to force users to specify a font size. For example, to select DejaVu Sans Mono with font size 12 and style Book, this should give:
set guifont=DejaVu\ Sans\ Mono-12:style=Book
This requires to:
[x] change the parsing: font size is available after the first dash (what happens if a font contains a dash??)
Currently, font can be changed by using from vim
The parsing is trivial: find the first
:
, what is on the LHS is the font name, on the RHS is the font size. The font name is then directly passed to the Evas_Textblock.Turns out that things are not that pretty in real life, as it is possible to specify fonts with great details with
fontconfig
. And Evas_Textblock actually parses the font as fontconfig formats. See the fontconfig user manual for details.So instead of having our own minimal format above, we should just use the fontconfig spec. We just need to force users to specify a font size. For example, to select
DejaVu Sans Mono
with font size 12 and style Book, this should give:This requires to:
Thanks @pcouderc12 for the report.