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

patcher: Fix grave (backtick) zero width #860

Merged
merged 1 commit into from
Aug 18, 2022
Merged

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented Jul 7, 2022

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 bug peculiar behavior of fontforge 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.

image

@Finii Finii added the Bug fix label Jul 7, 2022
[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

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii
Copy link
Collaborator Author

Finii commented Jul 7, 2022

Not all to-be-patched fonts contain a grave 😬
Force push.

@Finii
Copy link
Collaborator Author

Finii commented Jul 7, 2022

This commit fixed the behaviour of fontforge:

image

@Finii Finii added this to the v2.2.0 milestone Aug 18, 2022
@Finii Finii merged commit 3234fe0 into master Aug 18, 2022
@Finii Finii deleted the bugfix/grave-zero-width branch August 18, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant