Fix for some issues on Windows (hinting, and font naming in some programs)#202
Open
roelandschoukens wants to merge 2 commits into
Open
Fix for some issues on Windows (hinting, and font naming in some programs)#202roelandschoukens wants to merge 2 commits into
roelandschoukens wants to merge 2 commits into
Conversation
- Fill in OS/2 character sets: specifically we don’t want to advertise coverage of CJK characters, otherwise Windows will display Chinese glyphs (which we don’t have) in thumbnails. - Adjust font names: the "08" and "12" parts are part of the "family". Otherwise programs like GIMP will get really confused, and they will fail to use these fonts.
- Don't export hinting from SF - Don't export opentype tables to TTF files (this makes it so the TTF file is actually TTF and not OTF) - Must explicitly include opentype if using flags when exporting OTF - For ttfautohint use windows compatible mode and "light", aka "natural" hinting. Limit the sizes where hinting happens. - We definitely don’t want hinting information in OTF files or it will look absolutely terrible.
|
Do not install the OTF and TTF versions of fonts at the same time. |
Author
|
I only install the OTF versions. The screenshot is the build folder. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(nb I don’t know 100% what I’m doing here, so I’d love to hear from someone who knows this stuff what is actually going on here)
This PR contains two commits to fix some weird issues I am seeing on Windows 11.
Chinese glyphs in TTF and OTF thumbnails
This stops happening if you remove CJK from the OS/2 charsets. For that I added explicit entries in all the fonts.props files.
GIMP fails to use some fonts
The unadorned versions show the 08 weight. I don't know why the italic thumbnail is blank but that variant works. The
#1variants don't work.I suspect some apps don’t tolerate anything else than the usual "Bold" or "Italic" styles in style names. So I changed the TTF names so the "08" and "12" becomes part of the font family name. This seems not ideal but at least I can use all the fonts now.
So for that I edited the
LangNameentries like this:Hinting
A picture says more than a 1000 words. This is what I got on Windows 11 😟
TTF on the left, OTF on the right.
So it took some experimentation to figure out that:
ttfautohintdoes not affect opentype font files.font.generate()if you don’t give it a flags argument. But be advised if you specify it at all, by default you do not get opentype tables in your font unless you use the "opentype" flag.ttfautohintactually works. It was instructed to use the “slight”, or “natural” hinting.