jeanguyomarch / eovim

The Enlightened Neovim
https://github.com/jeanguyomarch/eovim/wiki
MIT License
193 stars 3 forks source link

Conform to fontconfig spec. #54

Closed jeanguyomarch closed 4 years ago

jeanguyomarch commented 4 years ago

Currently, font can be changed by using from vim

set guifont=fontname:fontsize

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:

Thanks @pcouderc12 for the report.