Closed madig closed 2 years ago
As for the new API itself, I'm not sure. uharfbuzz is quite low level and tries to mimic the harfbuzz API quite closely. But I suppose it doesn't hurt either. I'll leave it to @justvanrossum or @khaledhosny to decide
I like to expose the HarfBuzz C API faithfully as it allows for writing performance code. I don’t mind higher level API, though, if it allows people to write badly performing code 🤷🏾
What makes the method inefficient, except if you want to instantiate multiple Fonts from the same Blob or Face? Where would you do that?
In font collections (TTC, dfont) you can create multiple faces from the same blob. Fonts you can either create and reuse one font per size/variation settings etc, or keep changing the same font possibly invalidating internal HarfBuzz caches everytime the font changes.
Hm. So it helps to instantiate multiple Fonts explicitly from the same Face when you want to test VFs across the design space?
Not only for testing. Supposed to want to use bold and regular in the same document and it is a variable font, you create two fonts with different variation settings, or you create one font and keep changing variation settings each time you want to switch weights.
Because why not.
Can't easily test this locally because I don't have Cython handy. I think tox.ini is missing an
isolated_build = true
.