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
Fonts rendered are 25% larger than requested on SVG backend #1528
Comments
Hi dmcdougall: that's an important thought, but no. This is regular text. |
This is a tricky problem. There are seemingly differences of opinion about how font size units are handled in SVG. Chrome, Firefox and Inkscape handle them all differently. What we have now works with Chrome and Firefox and is at least the "correct" size in Inkscape, even though it isn't displayed as such. And it's a hack -- the size of the image is specified in points, which causes 1 pixel === 1 point in user space, and then the font size is specified in pixels. Inkscape gets confused because it wants to display the fontsize in points in its UI. This can be fixed to work as expected in Inkscape, (by specifying all units in pixels, but not all in points, interestingly enough) but then the output doesn't display correctly on Chrome or Firefox. This could be made a user option, but I'm wary of adding more obscure user options. SVG standards compliance is not the greatest ;( |
@mdboom Interesting! I hadn't realised standards compliance was so shoddy. I think it's reasonable to label this as WONTFIX, for the very reason of standards compliance. @kghose Have you tried creating a pdf or eps file and using a third-party tool to convert to SVG? There may be third-party solutions that allow the user to adjust certain elements of the file, e.g. font size. |
Since this appears to be an issue of different browsers implementing different standards, I've labelled this as 'wontfix' and I'm going to close it. If somebody feels there is a way to fix this then please feel free to reopen it. |
Problem The text painted with the 'text' function and any other lettering on the axes is 25% larger than requested
To reproduce
Here is a small example program that will reproduce the problem:
Opening up test.svg in inkscape will have all fontsizes larger by 25% (x 1.25)
Platform
Matplotlib version 1.2.0
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
The text was updated successfully, but these errors were encountered: