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

Example on how to draw with this #25

Open
sandmor opened this issue Dec 12, 2020 · 3 comments
Open

Example on how to draw with this #25

sandmor opened this issue Dec 12, 2020 · 3 comments

Comments

@sandmor
Copy link

sandmor commented Dec 12, 2020

So, I never use harfbuzz and I'm a bit lost about how to use this and integrate with ttf-parser or rusttype, can you provide an example of using this to draw non-latin text, I'm talking of an example with tiny-skia, ttf-parser and this or something that you want.
Thank you in advance

@RazrFalcon
Copy link
Collaborator

Yes, I've planned to write such example. It would be a bit rudimentary, because font fallback and emojis must be handled by the caller, but other than that it should be fine.

@xobs
Copy link

xobs commented Dec 13, 2020

I have a terrible, awful repo up at https://git.xobs.io/xobs/rust-font-test that you're welcome to steal from. That repository is an experiment in memory usage and rendering.

It uses rusttype for rendering.

It even renders emoji properly, and does a decent job of Arabic.

@sandmor
Copy link
Author

sandmor commented Dec 15, 2020

@xobs Thank you

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