rustybuzz icon indicating copy to clipboard operation
rustybuzz copied to clipboard

Example on how to draw with this

Open sandmor opened this issue 4 years ago • 3 comments

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

sandmor avatar Dec 12 '20 14:12 sandmor

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.

RazrFalcon avatar Dec 12 '20 14:12 RazrFalcon

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.

xobs avatar Dec 13 '20 07:12 xobs

@xobs Thank you

sandmor avatar Dec 15 '20 17:12 sandmor