Skip to content
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

matplotlib.tests.test_text.test_font_styles fails when DejaVuSans not installed #488

Closed
jkseppan opened this issue Sep 24, 2011 · 2 comments
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Comments

@jkseppan
Copy link
Member

The test case matplotlib.tests.test_text.test_font_styles includes reference files with some text set in a light font and some text in a condensed font. On my system both examples are set in a normal font, causing the test to fail. Investigation of the reference file font_styles.pdf (uncompressing with pdftk and grepping for BaseFont) shows that the fonts included in it are

DejaVuSansCondensed
BitstreamVeraSans-Bold
BitstreamVeraSans-BoldOblique
DejaVuSans-ExtraLight
BitstreamVeraSans-Roman

To be portable, the test should only rely on fonts that are delivered with matplotlib.

mdboom added a commit to mdboom/matplotlib that referenced this issue Sep 26, 2011
@mdboom
Copy link
Member

mdboom commented Sep 26, 2011

Agreed that this test is not portable. We can leverage the "directory" kwarg of findfont to only search within the mpl-data directory. It means the "Condensed" font is not really Condensed, but that in itself is a good test of the fallback feature of the font lookup code.

@jkseppan
Copy link
Member Author

jkseppan commented Oct 2, 2011

Agreed. Thanks for the fix!

@jkseppan jkseppan closed this as completed Oct 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

No branches or pull requests

2 participants