font-patcher: Break alternative unicode links before patching #1457
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.
[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
andE286
. In theExxx
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)