[cairo] I wonder whether it's possible to make a function to open font from TrueType file ?

Kristian Høgsberg krh at bitplanet.net
Sat Jan 27 11:55:41 PST 2007


On 1/23/07, KLEIN Stéphane <klein.stephane at gmail.com> wrote:
> Hello,
>
> I wonder whether it's possible to make a function to open font from
> TrueType file ? This feature is feasible ? planned ?

Cairo doesn't read TrueType files directly, you need to use the font
libraries on the platform you're working on.  For linux that would
typically be freetype, in which case you should use

cairo_font_face_t *
cairo_ft_font_face_create_for_ft_face (FT_Face         face,
                                        int             load_flags);

from cairo-ft.h with the FT_Face you get from freetype when you use it
to open a TrueType file.

cheers,
Kristian


More information about the cairo mailing list