Forum How do I...?

Scaling text stroke-width on conversion from SVG to PDF

redherring917
My issue right now is with how Prince is interpreting text stroke widths.

My SVG’s are defining the stroke as just a non-unit specific numeric value, like ‘stroke-width="1"’. All SVG’s look correct in that the same stroke width of "1" seems to “scale” appropriately for both smaller and larger physical dimension documents. But in the PDF’s that are created, Prince appears to likely be interpreting this stroke width as 1 pixel or point other such non-scalable absolute value, such that the stroke on any larger dimension document becomes barely visible.

I'm confused how in all cases the SVG’s look correct in that text strokes scale up and down as appropriate with each SVG’s defined physical size, and yet they aren’t interpreted "correctly" by Prince. I don’t know how stroke is any different than other non-unit specific references within the SVG that do scale appropriately when converted to PDF.

If I'm simply not understanding something here, please forgive me.

Thanks!

mikeday
Can you paste or attach a small example?
redherring917
Sure. Thanks.
  1. 3x15_stroke1_notypo.svg2.3 kB
mikeday
Thanks, I can see the text in Prince, but it doesn't show up at all in the browser. What do you expect it to look like?

Edit: oh right, it's really big, need to zoom out first. :)

Edited by mikeday

mikeday
It looks like stroke on text is scaled differently, we will try to fix this issue for the next release of Prince.
redherring917
Thanks mikeday. Any idea at all on an ETA for that?
mikeday
Not sure yet, further investigation is required.
mikeday
This issue has now been fixed in the latest Prince alpha.
redherring917
Wonderful news! Any idea when this might be incorporated into an official release?

Thanks.
mikeday
Early 2015.
mikeday
Prince 10 is now available, and includes the fix for SVG text stroke width. Thanks for letting us know about this issue. :)
redherring917
woohoo! thanks.