Skip to content
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

font-patcher: Fix crash on some custom sets #1006

Merged
merged 1 commit into from
Nov 26, 2022

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented Nov 26, 2022

Description

[why]
When a custom set is to be patched and that set contains the .notdef glyph the script crashes.

[how]
The glyphs has an unicode codepoint of -1, a code that we explicitely not patch. That leads to confusion when we try to determine the codepoint to be used for that glyph, because it has none.

Exclude negative codepoint glyphs when we determine the selection of to-be-patched glyphs.

As last resort for broken custom sets skip over glyphs that come out of order (which should be impossible).

Fixes: #1005

Requirements / Checklist

What does this Pull Request (PR) do?

Allow patching with custom sets that contain the notdef glyph.

How should this be manually tested?

Any background context you can provide?

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

[why]
When a custom set is to be patched and that set contains the .notdef
glyph the script crashes.

[how]
The glyphs has an unicode codepoint of -1, a code that we explicitely
not patch. That leads to confusion when we try to determine the
codepoint to be used for that glyph, because it has none.

Exclude negative codepoint glyphs when we determine the selection of
to-be-patched glyphs.

As last resort for broken custom sets skip over glyphs that come out of
order (which should be impossible).

Fixes: #1005

Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii force-pushed the bugfix/custom-set-with-undef branch from 445fde5 to 423c0de Compare November 26, 2022 14:29
@Finii
Copy link
Collaborator Author

Finii commented Nov 26, 2022

Forgot to increase the font-patcher internal version number, which is important for docker containers...
Force push.

@Finii Finii merged commit dd143be into master Nov 26, 2022
@Finii Finii deleted the bugfix/custom-set-with-undef branch November 26, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot patch nerd font Meslo LGS with codicons
1 participant