-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set_variations
seemingly broken for certain fonts
#19
Comments
First order of business is to see if this reproduces using hb-view. |
Not totally sure it’s relevant but seems worth mentioning — I was looking at the ttx of the fonts mentioned above in the original post, and it appears all the non-functioning variable fonts lack |
Ah, right. In |
Good to hear! Is there any chance of including the |
It's one function call. I don't see why not. @anthrotype |
all seems fixed in the 0.6.0 release! |
Not sure if this is a uharfbuzz-related issue (or an issue in harfbuzz itself), but on certain variable TTFs (examples below), the
Font.set_variations
method seems to have no effect on resultingglyph_positions
.Here’s the code I’m using (lightly modified from the example in this repo):
I should note that setting
features
in thehb.shape
function does seem to work as expected.Quite possibly there’s something I’m doing incorrectly, but I’ve been unable to find any examples on the internet of open-source code using the
hb_font_set_variations
function directly. Everything I’ve seen, such as fontview which uses libraqm, seems to instantiate variations indirectly via thehb_ft_font_create_referenced
function (worth noting that fontview does display these variations and glyph_positions correctly for all the fonts below).From top-to-bottom, Obviously (correct positions), Mutator Sans (correct positions), Vinila (incorrect positions), Compressa (Trial version) (incorrect positions). All the fonts are at their max
wdth
&wght
, and are returned from FreeType with the correct glyph shape variations. (The height of the pink bounding boxes is totally arbitrary, not a result of Harfbuzz.)The text was updated successfully, but these errors were encountered: