Skip to content

When text.usetex=True with pdf backend, full subset of latex fonts is embedded into pdf file #127

Closed

Description

@jesenko

Saving plots to pdf, using latex for font rendering (i.e. setting rcParams['text.usetex']=True) results in very large file size (~150kb for simple line plot with some mathematical latex expressions). This is due to all fonts being fully embedded into pdf.

When resulting pdf is postprocessed, so that only subset of fonts is embedded, file size is reduced drastically (e.g. from 150kb to 15kb).

The embedded fonts are of FontType=1.

Pdf backend should support embedding of subset of fonts when rcParams["text.usetex"]=True is used.

Activity

  1. jkseppan commented on Aug 27, 2011

    @jkseppan
    Member

    Needs Type1 subsetting, which is somewhat nontrivial. On my list of things to do eventually.

  2. tacaswell commented on Aug 18, 2014

    @tacaswell
    Member

    @jkseppan What is the state of this?

  3. added this to the milestone on Aug 18, 2014
  4. jkseppan commented on Aug 18, 2014

    @jkseppan
    Member

    Nothing yet. There's a plan for a larger-scope refactoring of text handling in MEP14 and that would help with subsetting too.

  5. petehuang commented on Jan 7, 2017

    @petehuang
    Contributor

    Updating after a couple years again: same as last comment

  6. modified the milestones: , on Sep 24, 2017
  7. modified the milestones: , on Jan 19, 2018
  8. modified the milestones: v3.0, needs sorting on Jul 26, 2018
  9. added a commit that references this issue on Jul 22, 2021
    b66579d
  10. 16 remaining items

  11. added 4 commits that reference this issue on May 12, 2025
    bfa309c
    ca76667
    b9c87f1
    1bc99cd
  12. added 3 commits that reference this issue on May 29, 2025
    6053ca6
    413a4d9
    76d8b3c
  13. moved this from Waiting for other PR to In Progress in Font and text overhaulon Jun 5, 2025
  14. removed
    keepItems to be ignored by the “Stale” Github Action
    on Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions