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

Projects
None yet
4 participants
@deeenes
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.

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.

@mdboom mdboom added the Needs review label Jul 9, 2016

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

@tacaswell

This comment has been minimized.

Member

tacaswell commented Jul 9, 2016

Is it possible to get a CFF font on travis?

@deeenes

This comment has been minimized.

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

@tacaswell

This comment has been minimized.

Member

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 tacaswell removed the Needs review label Jul 12, 2016

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

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

fixed font_manager.is_opentype_cff_font()
@tacaswell

This comment has been minimized.

Member

tacaswell commented Jul 12, 2016

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