Comment 55 for bug 375323

Revision history for this message
Christoph Buchner (bilderbuchi) wrote : Re: [Bug 375323] Re: ps and eps export with cairo in inkscape no usable with psfrag

1.1.10 is not new enough. Just follow the instructions in Adrian's post.

Sent from my phone.

On Oct 22, 2010 3:51 PM, "tikey" <email address hidden> wrote:

Hello Adrian,

I tried to use the new cairo in Windows. What I did was:
- installing inkscape 0.48
- downloading libcairo-2.dll and libpng14-14.dll from
http://www.gtk.org/download-windows.html and copying them to the program
folder of inkscape (thus replacing the existing libcairo-2.dll)
- saving a picture with text from inkscape as an eps

The eps is obviously exported with the new cairo version (1.10.0 which
should be the latest). Before, it was 1.8.8. Unfortunately the text is
still in the ascii-notation.

Maybe you can help me with this. Which cairo version did you use, when you
said that cairo now uses a (text)TJ notation?
Do I need any special settings when saving as an eps?

Thanks
  Thomas

P.S. the saved eps looks s/th like this:

(it should contain one text "Hallo" and one "\command")

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.10.0 (http://cairographics.org)
%%CreationDate: Fri Oct 22 15:28:44 2010
%%Pages: 1
%%BoundingBox: 0 -1 282 268
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%BeginProlog
/cairo_eps_state save def
/dict_count countdictstack def
/op_count count 1 sub def
userdict begin
/q { gsave } bind def
/Q { grestore } bind def
/cm { 6 array astore concat } bind def
/w { setlinewidth } bind def
/J { setlinecap } bind def
/j { setlinejoin } bind def
/M { setmiterlimit } bind def
/d { setdash } bind def
/m { moveto } bind def
/l { lineto } bind def
/c { curveto } bind def
/h { closepath } bind def
/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto
     0 exch rlineto 0 rlineto closepath } bind def
/S { stroke } bind def
/f { fill } bind def
/f* { eofill } bind def
/n { newpath } bind def
/W { clip } bind def
/W* { eoclip } bind def
/BT { } bind def
/ET { } bind def
/pdfmark where { pop globaldict /?pdfmark /exec load put }
   { globaldict begin /?pdfmark /pop load def /pdfmark
   /cleartomark load def end } ifelse
/BDC { mark 3 1 roll /BDC pdfmark } bind def
/EMC { mark /EMC pdfmark } bind def
/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def
/Tj { show currentpoint cairo_store_point } bind def
/TJ {
 {
   dup
   type /stringtype eq
   { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse
 } forall
 currentpoint cairo_store_point
} bind def
/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore
   cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def
/Tf { pop /cairo_font exch def /cairo_font_matrix where
     { pop cairo_selectfont } if } bind def
/Td { matrix translate cairo_font_matrix matrix concatmatrix dup
     /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point
     /cairo_font where { pop cairo_selectfont } if } bind def
/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def
     cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind
def
/g { setgray } bind def
/rg { setrgbcolor } bind def
/d1 { setcachedevice } bind def
%%EndProlog
11 dict begin
/FontType 42 def
/FontName /ArialMT def
/PaintType 0 def
/FontMatrix [ 1 0 0 1 0 0 ] def
/FontBBox [ 0 0 0 0 ] def
/Encoding 256 array def
0 1 255 { Encoding exch /.notdef put } for
Encoding 1 /uni0048 put
Encoding 2 /uni0061 put
Encoding 3 /uni006C put
Encoding 4 /uni006F put
Encoding 5 /uni005C put
Encoding 6 /uni0063 put
Encoding 7 /uni006D put
Encoding 8 /uni006E put
Encoding 9 /uni0064 put
/CharStrings 10 dict dup begin
/.notdef 0 def
/uni0048 1 def
/uni0061 2 def
/uni006C 3 def
/uni006F 4 def
/uni005C 5 def
/uni0063 6 def
/uni006D 7 def
/uni006E 8 def
/uni0064 9 def
end readonly def
/sfnts [
<0removed0>
] def
/f-0-0 currentdict end definefont pop
%%Page: 1 1
%%BeginPageSetup
%%PageBoundingBox: 0 -1 282 268
%%EndPageSetup
q 0 -1 282 269 rectclip q
0 267.877 282 -268 re W n
0 0 1 rg
0.41 196.971 281.145 -196.57 re f*
0 g
0.8 w
0 J
0 j
[] 0.0 d
4 M q 1 0 0 -1 0 267.877228 cm
0.41 70.906 281.145 196.57 re S Q
BT
32 0 0 32 52.982141 244.970978 Tm
/f-0-0 1 Tf
[<0102>-1<0303>-1<04>]TJ
ET
BT
32 0 0 32 100.982141 82.68526 Tm
/f-0-0 1 Tf
[<05060407>-1<07>-1<0208>-1<09>]TJ
ET
Q Q
showpage
%%Trailer
count op_count sub {pop} repeat
countdictstack dict_count sub {end} repeat
cairo_eps_state restore
%%EOF

--
ps and eps export with cairo in inkscape no usable with psfrag
https://bugs.launchpad.net/bugs/...