Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Consider removing AFM+mathtext support #18722

Closed
@anntzer

Description

@anntzer

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")

results in
test

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp