Skip to content

Commit

Permalink
CascadiaCode: Rehint and use ttf
Browse files Browse the repository at this point in the history
[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 <[email protected]>
  • Loading branch information
Finii committed Apr 27, 2023
1 parent d88d7bd commit b6301e5
Show file tree
Hide file tree
Showing 25 changed files with 13 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions src/unpatched-fonts/CascadiaCode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,17 @@

For more information have a look at the upstream website: https://github.com/microsoft/cascadia-code

## Preprocessed Source Font

This source font has been preprocessed - it is not taken directly from upstream.
Cascadia Code is mainly a variable font (VF) and the static versions (that Nerd Fonts
are based on) are prepared in a different way: They have been hinted with `ttfautohint`.
That hints differ considerably from the hints in the VF. That changes the rendering for
smaller sizes (usual sizes in terminals) considerably.

To get the 'original' (i.e. VF) feel of the font we redo the hints in the static versions:
Open the font with Microsoft's VisualTrueType (VTT) and apply Light Latin Autohint.
The issue is known upstream and will probably be fixed. But until it is fixed we need
to do this manual process on all source updates.

Version: 2111.01
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit b6301e5

Please sign in to comment.