-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CascadiaCode: Rehint and use ttf #1179
Conversation
[why] A lot people (read: People on Windows) have the variable font (VF) version of Cascadia Code installed - it comes bundled with Windows Terminal. The static Cascadia Code instances that we use for patching are hinted with ttfautohint which creates small sized glyphs that are visibly very different. People compare the static Caskaydia Cove with the VF Cascadia Code and are surprised. [how] First switch from the CFF outlines to TTF outlines - that is the original version (i.e. otf -> ttf). It is unknown why we created patched CFF fonts instead of the TTFs. To get as close as possible to the intended look of the glyphs we should stick with the outline type. Then we need to re-hint all the fonts, to get hints that are comparable to the VF hints. We can not use the hints of the VF because the outlines are different: The VF has (of course) overlapping outlines, while the static ones (as usual) have not. The re-hinting can be done with VTT or TTH - both showed results that are more like the original VF font. The usual ttfautohint has been used of the static fonts in the font release and can not be used. It is the reason for this whole problem. * Used VTT 6.35 * Open font file in VTT * Import all programs * Generate 'VTT talk' via Tools -> AutoHint -> LightLatinAutoHint * Save font file as ... References: microsoft/cascadia-code#371 https://learn.microsoft.com/en-us/typography/tools/vtt/ Closes: #998 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
How VTT looks likeStatic font before and after re-hintingThe x-height changes by one pixel at some sizes Fontforge shows the theoretical outline with a black line. It is modified by the hints to better fit to the actual pixels (grind shown). The green line is the outline after applying the hints / program. How much area of that green outline is in one particular pixel box determines that pixel's density (blackness). You see that the green outline does not in general match pixel borders, but especially for the x-height (the height of the lower case letters without ascenders, Note that the antialiasing view of fontforge is not (far from) perfect, and different font rendering engines have different results (and user settings). To really see what is going on the most reliable way is to actually install the font and have a look at it in small sizes with a magnifier (that does not do pixel interpolation) 😬 |
Note that VTT makes the font files considerably bigger. On the other hand the fonts will be even far more bigger after we patch them. But there is for sure room for improvement. |
[why] The font-patcher check workflow fails because the font used for testing is gone (replaced by differently named one). [how] Correct file names. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why] The font-patcher check workflow fails because the font used for testing is gone (replaced by differently named one). [how] Correct file names. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why] The font-patcher check workflow fails because the font used for testing is gone (replaced by differently named one). [how] Correct file names. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
A lot people (read: People on Windows) have the variable font (VF) version of Cascadia Code installed - it comes bundled with Windows Terminal.
The static Cascadia Code instances that we use for patching are hinted with ttfautohint which creates small sized glyphs that are visibly very different. People compare the static Caskaydia Cove with the VF Cascadia Code and are surprised.
[how]
First switch from the CFF outlines to TTF outlines - that is the original version (i.e. otf -> ttf). It is unknown why we created patched CFF fonts instead of the TTFs. To get as close as possible to the intended look of the glyphs we should stick with the outline type.
Then we need to re-hint all the fonts, to get hints that are comparable to the VF hints. We can not use the hints of the VF because the outlines are different: The VF has (of course) overlapping outlines, while the static ones (as usual) have not.
The re-hinting can be done with VTT or TTH - both showed results that are more like the original VF font. The usual ttfautohint has been used of the static fonts in the font release and can not be used. It is the reason for this whole problem.
References:
Closes: #998
Requirements / Checklist
What does this Pull Request (PR) do?
How should this be manually tested?
Any background context you can provide?
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)