-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Extra font info #1916
Extra font info #1916
Conversation
Changes Unknown when pulling 93b4321 on MicahChambers:extra_font_info into * on python-pillow:master*. |
@MicahChambers Thanks for the PR. The tests are failing for Python 3 because of |
@@ -168,6 +168,20 @@ def font_variant(self, font=None, size=None, index=None, encoding=None): | |||
index=self.index if index is None else index, | |||
encoding=self.encoding if encoding is None else | |||
encoding) | |||
def hasglyphs(self, text): |
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.
Please add a newline between these defs.
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 for the review. I'll look over it tonight! |
Changes Unknown when pulling 0d29026 on MicahChambers:extra_font_info into * on python-pillow:master*. |
Hmm. Not sure what is causing this segfault. Reading the freetype documentation I'm thinking listing the characters might be a bad idea: https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Get_First_Char Basically malformed charmaps happen and can result in 4 billion iterations.... I'm going to investigate to see if there is a way to get the all the glyphs then reverse map to the primary character mapping to each glyph.... If possible. |
Added some utilities for checking what characters are actually included in a loaded font. I personally find it frustrating to only be able to discover errors by looking at the rendered text.