[cairo] Cairo, Fonts and Illustrator

Donn donn.ingle at gmail.com
Fri Dec 21 01:43:56 PST 2007


> $cr -> text_path('HELLO')
> $cr -> fill
> It works but in Illustrator the text is now rendered as a series of
> vector paths, so can't be modifiable by the user with the TEXT TOOL.

I second this.

From my PyCairo pov, I have noticed that text rendered with show_text (and 
I've not done tests with pango) out to an SVG *seems* (I could be wrong) to 
be missing some tags in the xml.

In an Inkscape SVG file you will find a lot of path info describing the 
glyphs, but also this:
  <text
     xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Century 
Schoolbook L"
     x="20.242651"
     y="40.473438"
     id="text2247"
     sodipodi:linespacing="100%"><tspan
       sodipodi:role="line"
       id="tspan2249"
       x="20.242651"
       y="40.473438">Python</tspan></text>

I wrote the word "Python" on the screen. This keeps it as "text" when you edit 
the file. When I open a Cairo created file with letters in it, it's all 
paths.

\d


More information about the cairo mailing list