X Tutup
Skip to content

fixed font_manager.is_opentype_cff_font()#6714

Merged
tacaswell merged 1 commit intomatplotlib:masterfrom
deeenes:patch-1
Jul 12, 2016
Merged

fixed font_manager.is_opentype_cff_font()#6714
tacaswell merged 1 commit intomatplotlib:masterfrom
deeenes:patch-1

Conversation

@deeenes
Copy link
Copy Markdown
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
Copy Markdown
Member

Is it possible to get a CFF font on travis?

@deeenes
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants

X Tutup