Skip to content

Fall back to gvar for metric deltas - #85

Open
valadaptive wants to merge 2 commits into
dfrg:mainfrom
valadaptive:phantom-points
Open

Fall back to gvar for metric deltas#85
valadaptive wants to merge 2 commits into
dfrg:mainfrom
valadaptive:phantom-points

Conversation

@valadaptive

@valadaptive valadaptive commented Mar 16, 2025

Copy link
Copy Markdown
Contributor

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

xorgy commented Mar 29, 2025

Copy link
Copy Markdown
Collaborator

@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

xorgy commented Mar 29, 2025

Copy link
Copy Markdown
Collaborator

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

@waywardmonkeys
waywardmonkeys requested a review from dfrg April 26, 2025 16:41
@waywardmonkeys

Copy link
Copy Markdown
Collaborator

@dfrg Thoughts on this?

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.

3 participants