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

Don’t pass font to pain functions #189

Merged
merged 1 commit into from
Feb 3, 2024
Merged

Don’t pass font to pain functions #189

merged 1 commit into from
Feb 3, 2024

Conversation

khaledhosny
Copy link
Collaborator

Avoids the hb_(font|face)_(reference|destroy) at each function call. If the user needs the font, they can pass the Python Font in the paint_state.

Avoids the hb_(font|face)_(reference|destroy) at each function call. If
the user needs the font, they can pass the Python Font in the
paint_state.
@khaledhosny
Copy link
Collaborator Author

khaledhosny commented Feb 3, 2024

Painting U+270D from tests/data/noto_handwriting-cff2_colr_1.otf 100000 times using paint functions that does nothing:

Without this change:

real    0m1.441s
user    0m1.423s
sys     0m0.013s

With this change

real    0m1.269s
user    0m1.252s
sys     0m0.012s

@behdad
Copy link
Member

behdad commented Feb 3, 2024

I was very worried before you said 100000 times :))

@khaledhosny
Copy link
Collaborator Author

I was very worried before you said 100000 times :))

:) I thought someone would be

@behdad
Copy link
Member

behdad commented Feb 3, 2024

LGTM.

@khaledhosny khaledhosny merged commit 19ceb59 into main Feb 3, 2024
4 checks passed
@khaledhosny khaledhosny deleted the paint-cleanup branch February 3, 2024 19:33
@HinTak
Copy link

HinTak commented Feb 4, 2024

I was more worried about the mention of "pain" functions in the title. So harfbuzz is in the business of adding pain and suffering to the world now? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants