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

texmanager doesn't handle list of names for font.family #2012

Merged
merged 3 commits into from May 15, 2013

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented May 15, 2013

No description provided.

…ll pass when font.family is a list of strings (though there's no sane way for LaTeX to deal with that, but that's nothing new).
@mdboom
Copy link
Member Author

mdboom commented May 15, 2013

@Leejjon, @paalge, @pelson: I think this addresses a number of the problems brought on by cc61700. If you wouldn't mind confirming this addresses it, I'd like to fast track this since all text.usetex on master is currently broken.

@pelson
Copy link
Member

pelson commented May 15, 2013

Seems ok to me. My only critique is that it seems like the font system is being squeezed here to support something it wasn't originally designed for - is there an issue to raise this as a topic of a MEP for v1.4 (in my head I thought I'd seen one somewhere)?

elif family1 == family2:
return 0.0
return 0.1 * float(i)
Copy link
Member

Choose a reason for hiding this comment

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

This seems a bit magic to me, but I can live with it...

Copy link
Member Author

Choose a reason for hiding this comment

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

True. float(i) / float(len(families)) would be less magical. I'll change it to that.

@mdboom
Copy link
Member Author

mdboom commented May 15, 2013

I agree that the font system could probably use some new polish.

The font system has supported selecting fonts by a list of family names for a very long time -- it's just that it's now be exposed to the rcParam level.

The real problem here, in my opinion, is that the same parameters are being overloaded for use by the built-in font system and the LaTeX font system and they (necessarily) have very different semantics on how they handle things. This should probably be split into 3 things (somehow) -- a common interface that "does the right thing" in both contexts, and then separate things for more detailed control of each text type. I've thought for a long time that what we need is the concept of pluggable text backends so we could have the built-in matplotlib one, LaTeX, Pango, Apple and other text rendering infrastructure selectable and individually configurable -- but, yes, that's definitely a MEP-level discussion.

mdboom added a commit that referenced this pull request May 15, 2013
texmanager doesn't handle list of names for `font.family`
@mdboom mdboom merged commit b5c340a into matplotlib:master May 15, 2013
@mdboom mdboom deleted the texmanager-family-list branch August 7, 2014 13:49
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

2 participants