patcher: Fix grave (backtick) zero width #860
Merged
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.
Description
[why]
In ligature-enabled environments the accent grave will be rendered as
zero width, thus overlapping with the next character (in some source
fonts).
The problem is, that the glyph type in the sourcefonts is set to 'auto',
and fontforge exports these as 'mark' - the patched font will be broken.
[how]
There is no way we can get that glyph to be 'auto', but we can force it
to be an ordinary 'baseglyph' instead, and that will be respected on
export.
Maybe I should raise an Issue at fontforge... maybe later.
Fixes: #858
Fixes: #582
Requirements / Checklist
What does this Pull Request (PR) do?
Always set the glyph type of
grave
to 'just a normal glyph'.How should this be manually tested?
Use some patched font in a ligatures enabled environment, e.g. Writer, Word, VisualStudio, ... type in one "`" and the cursor should advance one slot.
Any background context you can provide?
adam7/delugia-code#11
The
bugpeculiar behavior offontforge
is fixed:head
(3253fff88) ✔️20220308
release ✔️20201107
release ❎What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)
'Before' screenshots are in Issue #585.
After this the glyph will always be 'one width' wide.