Search found 7 matches

by pheon
2012-09-30T13:40:03-07:00
Forum: Bugs
Topic: Error rendering fonts in svg
Replies: 1
Views: 3226

Error rendering fonts in svg

When rendering a font in an svg file, whose size is specified as xx pt, ImageMagick sensibly but incorrectly scales the font by the pixel density. According to this file http://www.w3.org/TR/SVG/coords.html#Units in an SVG "1pt" equals "1.25px" and so the font should be the same size irrespective of ...
by pheon
2012-09-30T12:10:37-07:00
Forum: Users
Topic: convert svg to png; font size changes with density
Replies: 9
Views: 14598

Re: convert svg to png; font size changes with density

I think it must be an ImageMagick thing. I found a ruby script which uses librsvg and it renders my files as I expect where convert does not.
by pheon
2012-09-30T11:02:26-07:00
Forum: Users
Topic: convert svg to png; font size changes with density
Replies: 9
Views: 14598

Re: convert svg to png; font size changes with density

On further reading, I do feel that ImageMagick or librsvg is in error somewhere. This document http://www.w3.org/TR/SVG/coords.html#Units explains that the unit "pt" in SVG should be interpreted as either 1.25px, and therefore the renderer should appropriately scale the font to fit within my lines ...
by pheon
2012-09-29T22:41:53-07:00
Forum: Users
Topic: convert svg to png; font size changes with density
Replies: 9
Views: 14598

Re: convert svg to png; font size changes with density

The .svg renders correctly in every browser I have tried, so I think it's OK. But digging some more, I think I have to specify the font-size in pixels not points. Everything works fine then. Thanks for your help.
by pheon
2012-09-29T19:19:57-07:00
Forum: Users
Topic: convert svg to png; font size changes with density
Replies: 9
Views: 14598

Re: convert svg to png; font size changes with density

<svg xmlns="http://www.w3.org/2000/svg" > <line x1="0" y1="100" x2="500" y2="100" stroke="grey" /> <line x1="0" y1="90" x2="500" y2="90" stroke="grey" /> <text x="10" y="100" font-family="Helvetica" font-size="10pt" > 10pt, Helvetica : QWERTYUIOPqwertyuiop1234567890 </text> <text x="10" y="120 ...
by pheon
2012-09-29T16:12:40-07:00
Forum: Users
Topic: convert svg to png; font size changes with density
Replies: 9
Views: 14598

Re: convert svg to png; font size changes with density

I think I have rsvg; how would I check? convert -density 288 test.svg -resize 25% test.png didn't work. The text is still bunched up. convert -density 72 test.svg test.png gives the text at the height I expected, and with the spacing I expected. I know that points and pixels don't necessarily mix ...
by pheon
2012-09-29T13:00:16-07:00
Forum: Users
Topic: convert svg to png; font size changes with density
Replies: 9
Views: 14598

convert svg to png; font size changes with density

I have an .svg file I'd like to render as a .png. It contains lines like <g id="ID000008" > <g transform="translate(68.250,259.228)"> <text x="0.000" y="0.000" font-family="Helvetica" text-anchor="start" font-size="11pt" fill="#000000" >12pt, Helvetica, painters : QWERTYUIOPqwertyuiop1234567890 ...