Skip to content

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

Closed

Description

@mspacek

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.

Activity

  1. mspacek commented on Jun 1, 2012

    @mspacek
    ContributorAuthor

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

  2. tacaswell commented on Jan 16, 2014

    @tacaswell
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions