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 font_manager.is_opentype_cff_font() #6714

Merged
merged 1 commit into from Jul 12, 2016

Conversation

deeenes
Copy link
Contributor

@deeenes deeenes commented Jul 9, 2016

font_manager.is_opentype_cff_font() gives false result because compares bytes to str. This won't cause trouble in Py2, but in Py3 results in calling EmbedTTFType3, and makes impossible to use CFF fonts. With setting the literal to type of bytes, it works fine.

`font_manager.is_opentype_cff_font()` gives false result because compares bytes to str. This won't cause trouble in Py2, but in Py3 results in calling `EmbedTTFType3`, and makes impossible to use CFF fonts. With setting the literal to type of bytes, it works fine.
@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Jul 9, 2016
@tacaswell
Copy link
Member

Is it possible to get a CFF font on travis?

@deeenes
Copy link
Contributor Author

deeenes commented Jul 9, 2016

It is hard to find a free, raw otf file available for download, what I could find is this one: https://github.com/cozy/cozy-files/raw/a8681c82e97339deb8e4c0abda8b98c0b57d3b35/client/app/assets/fonts/maven-pro-light-300.otf

@tacaswell
Copy link
Member

It is not clear to me what the license on that file is (and it does not appear to be in their tree anymore).

It looks like https://www.gnu.org/software/freefont/license.html are available on travis (https://github.com/travis-ci/apt-package-whitelist/pull/944/files).

I have verified 'by hand' that this works, will put in another PR with a test.

@tacaswell tacaswell merged commit a18dd50 into matplotlib:master Jul 12, 2016
tacaswell added a commit that referenced this pull request Jul 12, 2016
FIX:  Correctly identify OTF fonts

fixed font_manager.is_opentype_cff_font()
@tacaswell
Copy link
Member

Backported to v2.x as 03775bb

@deeenes Thanks 🎉

tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Jul 12, 2016
tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Jul 12, 2016
tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Jul 12, 2016
@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.0.1 (next bug fix release) Jul 12, 2016
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.

None yet

4 participants