fixed font_manager.is_opentype_cff_font() #6714

Merged
merged 1 commit into from Jul 12, 2016

Conversation

Projects
None yet
4 participants
Contributor

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.

@deeenes deeenes fixed font_manager.is_opentype_cff_font()
`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.
c71420c

mdboom added the needs_review label Jul 9, 2016

tacaswell added this to the 2.0.1 (next bug fix release) milestone Jul 9, 2016

Owner

tacaswell commented Jul 9, 2016

Is it possible to get a CFF font on travis?

Contributor

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

Owner

tacaswell commented Jul 12, 2016

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

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 70.336%
Details

tacaswell removed the needs_review label Jul 12, 2016

@tacaswell tacaswell added a commit that referenced this pull request Jul 12, 2016

@tacaswell tacaswell Merge pull request #6714 from deeenes/patch-1
FIX:  Correctly identify OTF fonts

fixed font_manager.is_opentype_cff_font()
03775bb
Owner

tacaswell commented Jul 12, 2016

Backported to v2.x as 03775bb

@deeenes Thanks 🎉

@tacaswell tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Jul 12, 2016

@tacaswell tacaswell TST: add test for CFF / OTF files
follow up to #6714
f2af658

@tacaswell tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Jul 12, 2016

@tacaswell tacaswell TST: add test for CFF / OTF files
follow up to #6714
50e06d7

@tacaswell tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Jul 12, 2016

@tacaswell tacaswell TST: add test for CFF / OTF files
follow up to #6714
9b2a886
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment