[cairo] text to postscript rendering
Kalle Vahlman
kalle.vahlman at gmail.com
Fri Feb 29 02:24:15 PST 2008
2008/2/29, Jürgen Ladstätter <info at innova-studios.com>:
> Hi there again,
>
> i played a little bit with pango_cairo now and found no function for using
> different fonts inside of a text. I could call the layout function everytime
> i use a different font, but the text is then not drawn after the last
> characters. Is there any function that would do this?
What you are looking for is either Pango markup:
http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html
or text attributes (specifically the font related attributes):
http://library.gnome.org/devel/pango/stable/pango-Text-Attributes.html#id2724863
Both allow you to change the font of a specified range of text, the
difference is that markup is simply text fragments inserted in the
string given to the layout while attributes are applied after the text
has been set to given character indexes. The markup in fact is
converted to attributes by pango, so usually attributes are the way to
go. At least in C where string handling sucks, on python for example
it's another story.
--
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
More information about the cairo
mailing list