[cairo] Loading font from a file in pycairo

Carl Worth cworth at cworth.org
Tue Aug 14 08:50:02 PDT 2007

On Fri, 10 Aug 2007 14:36:44 -0400, Michael Droettboom wrote:
> It looks like it is possible in C to load a freetype font with
> FT_Open_Face and then use cairo_ft_font_face_create_for_ft_face.

Yes, that's possible.

> Is freetype always assumed to be on all platforms,


> or would one have to use
> cairo_win32_font_face_create_for_hfont, for example, on Windows?

Yes. By design, cairo does not abstract away the native font
system. So, portable applications need to be able to talk to the
native font system, (or else use a portable library like pango that
does do some of that abstraction).

> Are there any thoughts about exposing this in pycairo?  Is this just a
> bad idea for reasons that I might be missing?

Any functionality that cairo has should definitely be exposed in
pycairo, (or any other language binding for cairo), in my opinion at

-------------- 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/20070814/09e10923/attachment.pgp 

More information about the cairo mailing list