go-text / typesetting

High quality text shaping in pure Go.
Other
88 stars 11 forks source link

Cache harfbuzz fonts #54

Closed benoitkugler closed 1 year ago

benoitkugler commented 1 year ago

This change (for #53) leverages the fact that the HarfbuzzShaper operates sequentially, so that modifying a harbuzz.Font is safe. (It wouldn't be the case with concurrent use, since a same *font.Font may be used with different user provided settings).

A test/benchmark would be welcomed :)

whereswaldon commented 1 year ago

I've opened a suggestion PR against this branch: https://github.com/go-text/typesetting/pull/56

Let me know what you think. :D