Navigation Menu

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

FreeSans horizontal misalignment in PDF, SVG, PS backends #912

Closed
mspacek opened this issue May 31, 2012 · 2 comments
Closed

FreeSans horizontal misalignment in PDF, SVG, PS backends #912

mspacek opened this issue May 31, 2012 · 2 comments

Comments

@mspacek
Copy link
Contributor

mspacek commented May 31, 2012

As noted in issue #903, the FreeSans '1' doesn't align properly on both the x and y axes when saved to .pdf, but does align reasonably when displayed and when saved to .png:

plot(np.arange(10))
gcf().savefig('freesans_example.png')
gcf().savefig('freesans_example.pdf')
gcf().savefig('freesans_example.svg')

Here are the resulting files:

http://devio.us/~mspacek/freesans_example.png
http://devio.us/~mspacek/freesans_example.pdf
http://devio.us/~mspacek/freesans_example.svg

It's too far to the right on both the x and y axes in both the .pdf and the .svg. This isn't really apparent in the .png (although still slightly off on the y axis), and doesn't happen with the default sans-serif font:

plot(np.arange(10))
gcf().savefig('sans-serif_example.png')
gcf().savefig('sans-serif_example.pdf')
gcf().savefig('sans-serif_example.svg')

Here are the resulting files:

http://devio.us/~mspacek/sans-serif_example.png
http://devio.us/~mspacek/sans-serif_example.pdf
http://devio.us/~mspacek/sans-serif_example.svg

Changing pdf.fonttype to 42 doesn't seem to have an effect.

Note all 6 of these files were generated with @jkseppan's fix for TrueType to Type-3 font conversion in #905, so the 0's and 8's look correct in the .pdf.

@mspacek
Copy link
Contributor Author

mspacek commented Jun 1, 2012

Note this also seems to happen in .ps files. I've updated the title to reflect this.

@tacaswell
Copy link
Member

Closing this due to the recent work on fixing alignment issues. @mspacek If this is still an issue please re-opepn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants