You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 26, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 26, 2026. It is now read-only.
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
Reacted by Alex Kladov, Richard Apodaca and rnikander
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.
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.
When I call shape, should the GlyphPositions I get back have y_offset set to something other than zero? Mine are all zero. I'm just trying to draw a simple string with this and ab_glyph. And I can't figure out how to shift the glyphs in the Y dimension.
Activity
RazrFalcon commentedon Dec 12, 2020
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 commentedon 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 commentedon Dec 15, 2020
@xobs Thank you
rnikander commentedon Dec 29, 2024
When I call
shape, should theGlyphPositions I get back havey_offsetset to something other than zero? Mine are all zero. I'm just trying to draw a simple string with this and ab_glyph. And I can't figure out how to shift the glyphs in the Y dimension.asibahi commentedon Dec 29, 2024
I used rustybuzz and ab_glyph in a project of mine. Code should be here https://github.com/asibahi/nun/blob/master/src/draw.rs