[cairo] Need a Font Primer

Evan Martin martine at danga.com
Mon Aug 21 22:09:11 PDT 2006


On 8/22/06, Travis Griggs <tgriggs at key.net> wrote:
> I'm sitting here looking at the fonts stuff, reading docs, feeling
> overwhelmed. I have a number of questions which I'm hoping you guys can help
> me with.

For anything more complicated that simple western text, you're best
off using Pango's Cairo rendering:
http://developer.gnome.org/doc/API/2.0/pango/pango-Cairo-Rendering.html

>From there you can probably just follow the dependencies of the
functions.  To draw you use pango_cairo_show_layout, which needs a
PangoLayout.  So if you look at its docs, you'll see you can get one
with pango_layout_new, which needs a PangoContext,  which looks like
you can get with pango_cairo_font_map_create_context or
pango_xft_get_context (depending on your display setup), etc.


More information about the cairo mailing list