Skip to content
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

Fixed set_variation_by_name offset #6445

Merged
merged 2 commits into from
Oct 28, 2022

Conversation

radarhere
Copy link
Member

Resolves #6439

When calling FT_Set_Named_Instance, the index starts at 1.

https://freetype.org/freetype2/docs/reference/ft2-multiple_masters.html#ft_set_named_instance

The index of the requested instance, starting with value 1.

Apparently in #3802, I presumed it started at zero, leading to the wrong variation being selected.

index = names.index(name)

@nulano
Copy link
Contributor

nulano commented Jul 17, 2022

Instead of increasing the epsilon so much, would it be better to modify variation_adobe_older_harfbuzz_name.png instead?

You can grab the image rendered on the CI from the errors artifact of the failed build, looks like a.png from tmpqztw6w8z is the correct replacement, attached below:

a

@radarhere
Copy link
Member Author

To be clear - I have implemented the suggestion from @nulano, and then he approved that.

@hugovk hugovk merged commit 31f66ea into python-pillow:main Oct 28, 2022
@radarhere radarhere deleted the set_variation_by_name branch October 28, 2022 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The set_variation_by_name method of FreeTypeFont is inconsistent with the result
3 participants