Skip to content

Fix #5998: Support fallback font correctly#6203

Merged
tacaswell merged 2 commits into
matplotlib:masterfrom
mdboom:mathfonts
Apr 12, 2016
Merged

Fix #5998: Support fallback font correctly#6203
tacaswell merged 2 commits into
matplotlib:masterfrom
mdboom:mathfonts

Conversation

@mdboom

@mdboom mdboom commented Mar 21, 2016

Copy link
Copy Markdown
Member

Cc: @zblz

@mdboom mdboom added this to the 2.0 (style change major release) milestone Mar 21, 2016
@mdboom mdboom changed the title Fix #6015: Support fallback font correctly Fix #5998: Support fallback font correctly Mar 21, 2016
Comment thread lib/matplotlib/mathtext.py Outdated

def __init__(self, *args, **kwargs):
# This must come first so the backend's owner is set correctly
TruetypeFonts.__init__(self, *args, **kwargs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the comment above still true?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually, I think it turned out that this move wasn't necessary after all -- I had meant to revert it before committing. I'll do so now.

@zblz

zblz commented Mar 23, 2016

Copy link
Copy Markdown
Member

Looks good to me! 👍

Do we have any idea why forcing an italics class was initially needed? Or was it just a bug?

@mdboom

mdboom commented Mar 23, 2016

Copy link
Copy Markdown
Member Author

In the context of STIX falling back to Bakoma, it needs to be hardcoded to it because the symbols the fallback was needed for are only in it. I think this was copied-and-pasted to the context of DejaVu falling back to STIX, where that is not the case.

@QuLogic

QuLogic commented Mar 26, 2016

Copy link
Copy Markdown
Member

Are there no italic numbers? 05 vs 15?

I also wonder what is wrong with the baseline of the 't'.

@mdboom

mdboom commented Apr 11, 2016

Copy link
Copy Markdown
Member Author

@QuLogic: That's correct. There are no italic circled numbers. Not sure what you mean by "05 vs. 15"

The baseline of t is a larger issue (addressed by #5414, but it will be some time to get that done). But that's not introduced by this PR.

@QuLogic

QuLogic commented Apr 11, 2016

Copy link
Copy Markdown
Member

@QuLogic: That's correct. There are no italic circled numbers. Not sure what you mean by "05 vs. 15"

No, I didn't mean circled, just plain italic numbers, e.g., mathfont_dejavusans_05.png vs. mathfont_dejavusans_15.png specify mathrm vs. mathit. But I see this is the case for the other fonts as well.

@mdboom

mdboom commented Apr 11, 2016

Copy link
Copy Markdown
Member Author

Yes -- there are no italic numbers in any of these fonts.

@mdboom

mdboom commented Apr 11, 2016

Copy link
Copy Markdown
Member Author

This is ready to merge.

@tacaswell tacaswell merged commit 0db1152 into matplotlib:master Apr 12, 2016
tacaswell added a commit that referenced this pull request Apr 12, 2016
Fix #5998: Support fallback font correctly
@tacaswell

Copy link
Copy Markdown
Member

backported to v2.x as 819f746

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