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

Fall back to gvar for metric deltas #85

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

valadaptive
Copy link
Contributor

@valadaptive valadaptive commented Mar 16, 2025

Like with googlefonts/fontations#497, we were previously not falling back to phantom point deltas if the hvar table was missing. This implements that.

I've used skrifa/read_fonts for this since it was already being used for adjust_axis and means we don't have to reimplement all the parsing here. This does require transmuting the coords from &[i16] to &[F2Dot14], but there are some transmutes like that already in the codebase (e.g. in src/text/compose.rs).

(Speaking of, which parts of this library are you planning to replace with skrifa?)

@xorgy xorgy requested a review from waywardmonkeys March 29, 2025 02:14
@xorgy
Copy link
Collaborator

xorgy commented Mar 29, 2025

@valadaptive

(Speaking of, which parts of this library are you planning to replace with Skrifa?)

If somebody is willing to do the work, anything in Swash that has an equivalent in Skrifa should be replaced with that equivalent. Swash was the proving ground for significant parts of Skrifa, but Skrifa should be considered to supersede Swash's versions of these things.

@xorgy
Copy link
Collaborator

xorgy commented Mar 29, 2025

I noticed you have a skrifafy branch which presumably is for this purpose. :+ )

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.

2 participants