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

[Bug]: Math fonts (Type 3) incorrectly embedded in PDF? #21797

Open
@andreas-brugger

Description

@andreas-brugger

Bug summary

PDFs containing math fonts cause the following error message in Adobe Acrobat:Cannot extract the embedded font. Some characters may not display or print correctly.

Code for reproduction

importmatplotlib.pyplotaspltfig,ax=plt.subplots(1,1,figsize=[2,1])# use TrueTypeifFalse:plt.rcParams.update({'pdf.fonttype':42})ax.axis('Off')ax.text(0.5,0.5,'$\\alpha~\\beta~\\gamma$',ha='center')fig.savefig('Test.pdf')

Actual outcome

Adobe Acrobat error message

Expected outcome

The font seems to be displayed correctly, but apparently it is not correctly embedded.

Additional information

To reproduce this issure, open the PDF created by Matplotlib in Adobe Acrobat, navigate toDocument Properties > Fonts > OK. The error message is only displayed if one changes the zoom, switches pages, etc. The error message arises in recent versions of Adobe Acrobat on different operating systems.

The error message arises only for PDFs containing mathematical expressions, while PDFs with regular text cause no error message. However, the issue seems to arise independently of the actual font type and arises for the default fontdejavusans and others such asstix.

The issue furthermore arises for the default value ofpdf.fonttype being Type 3. When switching to TrueType (causing much larger file sizes), the error message no longer arises.

Operating system

No response

Matplotlib Version

3.4.3

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp