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

Moving variable font logic into read-fonts #1263

Open
LaurenzV opened this issue Nov 25, 2024 · 2 comments
Open

Moving variable font logic into read-fonts #1263

LaurenzV opened this issue Nov 25, 2024 · 2 comments

Comments

@LaurenzV
Copy link
Contributor

I was trying to look into whether I can use read-fonts to build an instancer for TTF fonts, for usage in PDFs. Building a full-blown instancer is obviously a huge task, but luckily, for PDF, I only need to instance the hmtx and glyf tables, which I'm hoping will be much more doable.

I still need to do some proper reading to assess what I need to do to achieve this, however, at a first glance, when looking into this I noticed that most of the VF handling for glyph outlines seems to be inside skrifa in deltas.rs. Would it make sense to move some of this into read-fonts, so that other crates can re-use the code, or is there a particular reason why it's not in read-fonts? Another option would be to expose it in skrifa, but it seems to me like this would go against its philosophy, since skrifa is supposed to be very high-level and it also would be unfortunate to have to depend on skrifa just for that.

@dfrg
Copy link
Member

dfrg commented Nov 27, 2024

I don’t see any problem with moving this to read-fonts, perhaps as methods on the gvar table. The API requires passing in a lot of buffers (to avoid internal allocation) so that might need to be cleaned up and better documented for public use.

@rsheeter
Copy link
Collaborator

Building a full-blown instancer is obviously a huge task

FYI, we do plan to tackle this, likely after klippa (memory safe hb-subset) wraps up.

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

No branches or pull requests

3 participants