[cairo-bugs] [Bug 23551] Wishlist: psfrag compatible postscript output

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 1 12:25:53 PST 2010


http://bugs.freedesktop.org/show_bug.cgi?id=23551





--- Comment #9 from Adrian Johnson <ajohnson at redneon.com>  2010-02-01 12:25:51 PST ---
Created an attachment (id=32976)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=32976)
patch

It looks like a bug in Inkscape. Testing with pango-view:

$ echo "The quick brown fox jumps over the lazy dog." > test.txt
$ pango-view -o test.ps test.txt
$ tail -12 test.ps
12 0 0 12 10 12.861328 Tm
/f-0-0 1 Tf
(The quick brown fox)Tj
10.382812 0 Td
( jumps over the lazy)Tj
10.209473 0 Td
( dog.)Tj
ET
Q Q
showpage
%%Trailer
%%EOF

So the maximum PDF kerning value of 10 is too conservative. Apply the attached
patch to increase it too 100. The output is now:

$ tail test.ps
0 g
BT
12 0 0 12 10 12.861328 Tm
/f-0-0 1 Tf
(The quick brown fox jumps over the lazy dog.)Tj
ET
Q Q
showpage
%%Trailer
%%EOF

I used Inkscape to create an SVG file with the same text:

$ tail drawing.svg
      
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu
Sans;-inkscape-font-specification:DejaVu Sans"><flowRegion
         id="flowRegion2818"><rect
           id="rect2820"
           width="557.36444"
           height="166.96379"
           x="135.04425"
           y="254.37344" /></flowRegion><flowPara
         id="flowPara2822"
         style="font-size:20">The quick brown fox jumps over the lazy
dog.</flowPara></flowRoot>  </g>
</svg>

$ inkscape -P drawing.ps drawing.svg
$ tail drawing.ps
0 g
BT
16 0 0 16 108.025 622.952038 Tm
/f-0-0 1 Tf
[(The qu)-3(ick br)19(own fo)30(x jumps over)-3( the lazy )-3(dog.)]TJ
ET
Q Q
showpage
%%Trailer
%%EOF


The problem here is for some reason Inkscape is not positioning glyphs at their
natural glyph advances. As a result text will not appear in the PS output as a
contiguous string.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list