-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
RuntimeError In FT2Font with NISC18030.ttf #7305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
mpl ships with a copy of Vera (https://github.com/matplotlib/matplotlib/tree/v1.5.3-doc/lib/matplotlib/mpl-data/fonts/ttf ) for Unfortunately, the changes to the text likely fall back to the version of freetype installed on the system. For the tests we pin to a specific version of freetype (https://github.com/matplotlib/matplotlib/blob/master/setupext.py#L67 2.6.1) when building the tests. With this pinned, we get (and test) pixel identical results on mac, linux and windows (mostly). You are looping over all of the fonts found on a your system which makes me think you have a specific font that we are parsing badly. Can you sort out exactly which font is causing trouble? |
@tacaswell - Thanks for the explanation! This is the font that throws the error when calling
|
Using a copy of the font from https://github.com/justrajdeep/fonts I can reproduce this. Surprised we do not see this more as it seems to be a stock font on mac https://support.apple.com/en-us/HT201344 |
It looks like it is a font with a non-standard format,
This seems to be a long-standing issue as https://sourceforge.net/p/matplotlib/mailman/message/9332845/ Not clear to me if this file is mal-formed or we (and imagemagik and corelDraw) do not implement the full ttf spec. @cdeil The best thing here would be for you to handle the exceptions at the application error as mpl should not snarf exceptions from mal-formed (ie we can not read them) fonts. |
@tacaswell - For me, it's OK to just close this issue. Unless it's useful to keep for MPL as a reminder of the issue. I just thought I'd report it in case it's an MPL issue, and because I had a related question (which you answered). |
If you are happy going to close this issue. |
We're trying to fix the font in our MPL scripts to avoid PNG and PDF images changing depending on who produced it (Linux / Mac machines, different MPL versions).
So our idea was to find one font that everyone has and set that font.
How can I find out if I have 'Bitstream Vera Sans' (or some other font) available in my MPL install?
I tried this and got a RunTimeError.
Is this a bug or am I doing it wrong?
Python 3.5 and MPL 1.5.3 from Macports on macOS.
The text was updated successfully, but these errors were encountered: