Need help with font validation for Windows

Hi! I’m creating subset demo fonts using fontTools, but apparently Windows 10 (maybe other versions too) is not happy about it — the users say the OS fails to install them because they are “not valid font files”. FontBakery says nothing, so I’m confused. Is there anyone here on Windows who could help to find the culprit?

Maybe because the character set doesn’t cover at least Windows 1252?

This one? Most demo fonts don’t cover it either though?

Would you mind sending me the exported file for testing?

1 Like

Depending on your Windows version, it may also be a long style name. See the Naming tutorial.

Also, go through the steps in the Make Your Fint Work in Windows tutorial.

From some trial and error so far, it looks like Windows (various versions) doesn’t allow using a replacer/placeholder glyph* for any of these characters:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.,:;!'"#$%&()*+-/

*By which I mean removing the glyph and mapping its unicode in CMAP to some placeholder like the asterisk, so that you get th*s instead of a fallback font. But if you don’t mess with CMAP and just remove these glyphs, Windows is ok with it again. Oddly specific, but okay.

1 Like

How did you implement the cmap mapping?

With fonttools:

for table in font['cmap'].tables:
	for c in unicodes_to_remove:
		if c > 65535: # skip non-BMP characters
			continue
		table.cmap[c] = placeholder
1 Like

Does checking that c is actually in table.cmap before changing its mapping make any difference?

I don’t think so — unicodes_to_remove are those available in the font.

Sidenote: I wonder (but haven’t checked myself yet) how this works with all-caps fonts as the Glyphs tutorial suggests. Does adding multiple unicodes to a glyph in Glyphs does something different? Does Windows allow specifically a=A but not a=asterisk or something like that?