FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Wrong symbols from a TrueType font · Issue #2870 · matplotlib/matplotlib · GitHub

Repository navigation

Wrong symbols from a TrueType font #2870

Closed

Description

When I figured out that OpenType fonts wouldn't work, I found LucidaBrightRegular.ttf in Java and tried to use it with

matplotlib.rcParams['font.family'] = 'Lucida Bright'
plt.title('abc [def](ghi)')

(I actually need this for something like plt.xlabel('length [cm]').)

But this is what I get in PDF, the closing parenthesis are rotated and displaced (or maybe the wrong symbol is used):

while PNG and native GUI on Mac OS X work fine. I'm using the latest matplotlib (9fea430) with Python 3.3.

Related issue: #2869

Activity

  1. mdboom commented on Mar 18, 2014

    Member

    This font declares the right bracket and parentheses as a copy of the left bracket with a different affine transformation applied. Unfortunately, our font subsetting tool, ttconv, does not support this case. Using freetype for this (as described in #2869) would probably fix this problem, but I don't think there is an easier fix. As a workaround, setting pdf.fonttype to 42 (to turn off font subsetting) works, or you can use the Cairo backend.

  2. mojca commented on Mar 18, 2014

    Author

    Thanks a lot for the hint, rcParams['pdf.fonttype'] = 42 saved my day. (I wish I knew about that option earlier, I spent a couple of hours trying to make an OpenType font work.)

    Cairo isn't an option as it doesn't support the kind of graphics I'm using in my plot.

  3. jkseppan commented on Aug 1, 2020

    Member

    Fix in #18081

  4. added this to the v3.4.0 milestone on Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL