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

Use ttf-parser for font parsing #36

Open
notgull opened this issue May 3, 2023 · 5 comments
Open

Use ttf-parser for font parsing #36

notgull opened this issue May 3, 2023 · 5 comments

Comments

@notgull
Copy link

notgull commented May 3, 2023

I see that this crate uses its own code for TTF parsing. Is there a reason why ttf-parser isn't used here? It has no dependencies and is written in exclusively safe code.

@dfrg
Copy link
Owner

dfrg commented Jun 22, 2023

The primary value proposition of swash is support for hinting which is not possible to implement on top of ttf-parser without significant architectural changes to that crate.

@Maximkaaa
Copy link

I don't know much about how fonts work, but it seems that rustybuzz implement hinting even though they use ttf-parser for font loading. Or is it related to performance considerations?

@dfrg
Copy link
Owner

dfrg commented Feb 21, 2024

Rustybuzz implements shaping. AFAIK swash is the only rust library with full support for hinting.

@Maximkaaa
Copy link

Yeah, sorry, I completely misunderstood things. The more I understand about text rendering the more I understand that I don't understand more than I understand...

The source of my confusion was that I saw a reference to ttf-parser HintDevice and thought they use it (though they clearly don't since they don't do rasterizing).

@dfrg
Copy link
Owner

dfrg commented Feb 22, 2024

Yes, text rendering is a very deep rabbit hole :)

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