alexheretic / ab-glyph

Rust API for loading, scaling, positioning and rasterizing OpenType font glyphs
Apache License 2.0
372 stars 24 forks source link

Add methods to reset the Rasterizer without reallocating #22

Closed rlespinet closed 4 years ago

alexheretic commented 4 years ago

Looks good! Thanks for the pr & good documentation. I've added some very minor comments.

I assume this is to allow optimising allocations while rasterizing many glyphs on a single thread. Out of interest, which projects are you thinking of using these changes in?

rlespinet commented 4 years ago

Thanks for the fast review, I'm using it to render fonts in a small project but my guess is that it could be used for other projects as well, since we usually know the maximum rendering size of a glyph for a given font and size.