Closed behdad closed 2 years ago
PTAL.
it would be good to confirm that it actually works as intended with a little test in https://github.com/harfbuzz/uharfbuzz/blob/main/tests/test_uharfbuzz.py
even as simple as loading a font, creating the sub font from it, then asserting that the returned value is actually a Font and that its id() is different (font2 is not font) even though the Face the two fonts refer to is the same (e.g. font2.face == font.face)
it would be good to confirm that it actually works as intended with a little test in https://github.com/harfbuzz/uharfbuzz/blob/main/tests/test_uharfbuzz.py
even as simple as loading a font, creating the sub font from it, then asserting that the returned value is actually a Font and that its id() is different (font2 is not font) even though the Face the two fonts refer to is the same (e.g. font2.face == font.face)
Thanks. Done. It fails. I don't know pyx enough to know what I'm doing wrong...
Looks like calling __new__
still calls __cinit__
after. Is that expected?
I suppose we can make the regular constructor create a subfont if it's passed a Font instead of a Face, instead of new API.
I'll take a look tomorrow
I managed to move it to constructor and have tests pass.
Untested.