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: Warn if sourcefont is a VF #960

Merged
merged 1 commit into from
Jan 6, 2023
Merged

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented Oct 10, 2022

[why]
fontforge is not really able to work with OpenType variable fonts, at least not with all. Some support is available as MM, for older formats. But anyhow we do not really create a patched variable font but a fixed font.

People might ignore all the errors Fontforge throws on opening, so an explicit message might be in order.

[how]
It is not possible to detect a VF input font with current fontforge reliably. Instead we search for the existence of one of the tables that are needed for a variable font. We can not rely on STAT, because that might be also used in fixed fonts.

Fixes: 512

Requirements / Checklist

What does this Pull Request (PR) do?

Just add a warning when trying to patch a VF.

How should this be manually tested?

Patch a normal (static) font, patch a VF font.

Any background context you can provide?

What are the relevant tickets (if any)?

#512

Screenshots (if appropriate or helpful)

@Finii Finii force-pushed the feature/detect-VF branch 2 times, most recently from 4871ea6 to fe2bfed Compare October 10, 2022 10:52
@Finii
Copy link
Collaborator Author

Finii commented Oct 10, 2022

image

Fixed in #961

[why]
fontforge is not really able to work with OpenType variable fonts, at
least not with all. Some support is available as MM, for older formats.
But anyhow we do not really create a patched variable font but a fixed
font.

People might ignore all the errors Fontforge throws on opening, so an
explicit message might be in order.

[how]
It is not possible to detect a VF input font with current fontforge
reliably. Instead we search for the existence of one of the tables that
are  needed for a variable font. We can not rely on STAT, because that
might be also used in fixed fonts.

Some fontforges might crash on VFs, so we give a warning before we even
open the font and one after the patched font has been created.

Fixes: #512

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant