[cairo] pango + cairo userfont

Carl Worth cworth at cworth.org
Tue Apr 8 11:46:05 PDT 2008

On Tue, 08 Apr 2008 14:35:19 -0400,  wrote:
> I am tryingto do something which seems similar.? I am using Cairo to
> render to an ARGB surface.? I need to be able to render text using
> any system font (and any language) onto this surface.? I have added
> FontConfig, FreeType and Pango to my implementation as the initial
> steps to achieve this.? Is this thread indicating that this is not
> something I can expect to do until this is implemented?? I can
> currently find and select fonts using FontConfig and
> FreeType.??However, it seems the Pango / Cairo rendering is still
> limited to the base set of fonts Cairo supports.? Is there some
> other way to achieve my goal?

Hi Bob,

No, you definitely don't need to wait for any of this work to be able
to use pango and cairo to render with any installed system-font.

This new work is actually about being able to render non-installed,
non-system fonts, (like something like a SVG file that includes an
embedded "font" in a format that freetype knows nothing about).

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.

Please do let us know more details about what problem you're having,
and we'll be glad to help.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080408/e832961c/attachment.pgp 

More information about the cairo mailing list