Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Describe the issue
Summary
Theps.useafm
rcParam can be used to force the postscript backend to only use "standard" postscript fonts (a hard-coded list of fonts listed in the postscript specification, which are guaranteed to be shipped with any compliant postscript interpreter, and therefore don't need to be embedded in the ps file; this makes the resulting ps file a bit smaller). A similar setting exists for the pdf backend, namelypdf.use14corefonts
.
When usingmathtext, the pdf backend does not respectpdf.use14corefonts
, i.e. any math text uses the normal fonts for math, which get embedded using the normal mechanism in the pdf file. On the other hand, the ps backend does respectps.useafm
, and still tries to use standard ps fonts for mathtext. It does so using some custom glyph mappings (mathtext.latex_to_standard
) and a fair bit of custom code (the 159-line StandardPsFonts class); however, it turns out that the mappings are in large partvery wrong. For example,
rcParams["ps.useafm"]=True;figtext(.5,.5,r"$\Gamma\grave a$");savefig("/tmp/test.ps")
Although the tables are fixable, the fact that no one has apparently ever noticed this (especially on capital greek letters, which are not that obscure) suggests to me that the feature is essentially unused (my guess is thatps.useafm
is already very rarely used in itself...). So I think it is reasonable to at least give up on forcing the use of standard fonts for ps+mathtext output; i.e., just like the pdf backend currently does.
Proposed fix
Allow the use of fonts other than the postscript standard fonts for ps+mathtext, even whenps.useafm
is True.
attn@jkseppan, who may be one of the few people interested in this?