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

Extra font info #1916

Closed
wants to merge 5 commits into from
Closed

Extra font info #1916

wants to merge 5 commits into from

Conversation

micahcc
Copy link

@micahcc micahcc commented May 20, 2016

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.

@coveralls
Copy link

coveralls commented May 20, 2016

Coverage Status

Changes Unknown when pulling 93b4321 on MicahChambers:extra_font_info into * on python-pillow:master*.

@hugovk
Copy link
Member

hugovk commented May 20, 2016

@MicahChambers Thanks for the PR.

The tests are failing for Python 3 because of unichr: https://travis-ci.org/python-pillow/Pillow/builds/131615297

@@ -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):
Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@micahcc
Copy link
Author

micahcc commented May 23, 2016

Thanks for the review. I'll look over it tonight!

@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Changes Unknown when pulling 0d29026 on MicahChambers:extra_font_info into * on python-pillow:master*.

@micahcc
Copy link
Author

micahcc commented May 24, 2016

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.

@aclark4life aclark4life added this to the 3.5.0 milestone Oct 3, 2016
@radarhere radarhere modified the milestones: 4.1.0, 4.0.0 Jan 7, 2017
@wiredfool wiredfool modified the milestones: 4.1.0, 4.2.0 Apr 1, 2017
@radarhere radarhere removed this from the 4.2.0 milestone Oct 4, 2017
@micahcc micahcc closed this Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants