ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
54.16k stars 3.63k forks source link

font-patcher: Break alternative unicode links before patching #1457

Closed Finii closed 8 months ago

Finii commented 10 months ago

[why] The D2Coding font has a lot of glyphs shared between multiple unicode codepoints. Usually we just want to change the glyph on one particular codepoint and not on all linked ones; which will affect codepoints not in our patching ranges.

For example the glyph FULL BLOCK is used by codepoint 2588 and E286. In the Exxx range they have a lot of icons, and also a full block.

[how] Remove all links on glyphs that we are about to patch over, so that we really just patch the codepoint we want to patch (and have no hidden 'links').

[note] This could in principle break alts or ligs if they rely on another codepoint that we removed. But breaking ligs is always a possibility when patching over existing glyphs.

[note] I checked several (not all) fonts in our repertoire, and only D2coding is affected.

Fixes: #1454

Reported-by: @hdd1013

Requirements / Checklist

What does this Pull Request (PR) do?

How should this be manually tested?

Once check one font file of all source-fonts via ... there is a test script for that?

Any background context you can provide?

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)