[cairo] pango + cairo userfont

Behdad Esfahbod behdad at behdad.org
Tue Apr 8 12:40:09 PDT 2008


On Tue, 2008-04-08 at 12:10 -0700, Carl Worth wrote:
> On Tue, 08 Apr 2008 14:01:04 -0500, Behdad Esfahbod wrote:
> > On Tue, 2008-04-08 at 14:46 -0400, Carl Worth wrote:
> > > If you are finding and selecting fonts with fontconfig and freetype
> > > then you should be able to use cairo_ft_font_face_create_for_pattern
> > > and cairo_ft_font_face_create_for_ft_face together with
> > > cairo_set_font_face to render with any font that you can select.
> >
> > But then cairo_set_font_face is irrelevant when using pangocairo.
> >
> > To answer the original question, if you just want to use pango for font
> > enumeration, selection, and rendering, it works today.  If you want to
> > choose the font using freetype and fontconfig yourself and just have
> > pango use it for rendering, it doesn't work yet.
> 
> Oops. I apologize for spreading misinformation. I guess I just haven't
> played with pango's font selection mechanisms. (But I should have
> realized I was wrong since I do know that pango will render glyphs
> from many separate fonts as necessary to satisfy the needs of the
> characters you ask for.)
> 
> Anyway, I'm curious, Behdad. Does your "yet" suggest that there are
> plans for supporting cairo-based font selection in pango? Something
> else?

The bug that I referenced twice yesterday is exactly that:

  Bug 347237 – Making Pango use a given cairo_font_face_t
  http://bugzilla.gnome.org/show_bug.cgi?id=347237

After that I probably will add something like pango_cairo_show_text()
which is a cairo_show_text() replacement.

> -Carl
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



More information about the cairo mailing list