-
Notifications
You must be signed in to change notification settings - Fork 120
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
Implementing Typography for Skia #376
Conversation
…y are affected by push and pop operations.
- Implemented text_font and text
Hey @ziyaointl I have called the Also Let me know your thoughts, and you can review this PR. It is good to go. I will do multiple PRs this time and use issue #371 to keep track of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I really appreciate the effort that you took to split up large PRs into small ones. This makes reviewing so much easier :D
One nit: I think that adding preload
is conceptually different enough from the other font functions that this PR could be split up further, but this is just for future reference - no need to split up this particular PR now.
@@ -109,7 +101,7 @@ def text_font(font, size=10): | |||
:type font: PIL.ImageFont.ImageFont | |||
|
|||
""" | |||
p5.renderer.font_family = font | |||
p5.renderer.text_font(font, size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of passing in a default size of 10, we should probably use the current font size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks like the size
parameter is being ignored by vispy's text_font
, could you also do a quick fix for that as well?
And yes, I think putting |
- Update the text() to use current text_size if not specified - Remove unused variables
- Update typography test
I have updated the PR and added a test for typography |
Kudos for adding the tests! |
Closes #373
Related to #371