nerd-fonts icon indicating copy to clipboard operation
nerd-fonts copied to clipboard

Bugfix: Automatic symbols only font generation

Open Finii opened this issue 3 years ago • 2 comments

Description

[why] The symbol only fonts Symbols-1000-em Nerd Font Complete.ttf and 2048-em in NerdFontsSymbolsOnly/ are generated from some 'almost' empty source fonts, that are assumable in turn generated from the sfd font descriptions in src/glyphs/?

The process is not documented and we have issues in the generated font (for example the glyph for capital E is defined (and empty) #581 #765).

[how] Use the existing font definitions from src/glyphs/*.sfd directly as source font. That needs a change in font-patcher because the empty fonts have no glyphs that can be used to orient the scaling upon. In that case scale on the source font definitions EM.

Then we need patch-em-all to also patch *.sfd fonts.

And finally we need patch-em-all to take a font specific command line switch for font-patcher (compare 9e2bc9a2 of #723) to instruct it to create a ttf rather than a sfd front file.

In the sfd file we additionally set the Panose type. And the UnderlinePosition is adjusted to match the current patched font.

[note] Also fix wrong glob pattern in patch-em-all *.[o,t]tf. The comma is for sure some leftover from a '{}' shell pattern, that is not used anymore.

Requirements / Checklist

What does this Pull Request (PR) do?

Autogenerate the symbols only fonts from the sdf templates and not the ttf templates.

How should this be manually tested?

Any background context you can provide?

Automatic generation from ttf files: #479 Issues with ttf files: #581 #765

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

Finii avatar Mar 03 '22 16:03 Finii

I guess the empty E letter comes from the problem that font-patcher needs (*) at least one valid glyph in the basic range (0000 - 017F to determine the font metrics. So probably Ryan added an empty E, patched, and then removed the E - all manually?

That does not make much sense either ;-) Whatever.

*: Well, it does not need it anymore with the PR, if no glyph is existing the EM is used

Finii avatar Mar 03 '22 16:03 Finii

I consistently typed front instead of font in the commit messages :->

Fixed and force push to get rid of that embarrassment.

Finii avatar Mar 03 '22 16:03 Finii

Rebase on master, resolve conflicts by changing to -iregex, force push

Finii avatar Aug 20 '22 17:08 Finii