What makes a font invalid for use in gVim?

fonts, vim

Solution

Did you read `:h guifont`?

I've already made wild guesses in another very similar question but I couldn't find it ATM. In short, GVim on Windows is very picky about its fonts: it wants a monospaced font but something in the fonts you have tried is not to its liking.

In this case, "Cronos Display" is obviously not monospaced so there's no way it could work. I don't know about "Monospace" but I'm surprised "Liberation Mono" doesn't work.

You could open the fonts in a font editor to seee if they are really monospaced.

Problem

I'm using gVim on Windows 7 and I recently added some fonts to C:\Windows\Fonts. In gVim, I can `:set guifont=Font_Name` some of them and it gets set as expected, but for several others I get `E596 Invalid font(s): Font_Name`. Obviously the fonts which do not make the cut either have or lack some property which gVim requires of fonts it loads. Does anyone know what those are, and what, if anything, one might do to modify an existing font so that it meets those criteria? In particular, the following fonts fail: - Cronos Display - Liberation Mono - Monospace I will not be surprised to learn that these fonts are incomplete or missing something that Vim requires. I just have no idea what to check for.

Original source

Related problems