[cairo] cairo_font_face_create_from_file/data()

Behdad Esfahbod behdad at behdad.org
Fri Sep 14 21:04:01 PDT 2007


So, while writing the last comment in:


It occurred to me that it would be useful to all cairo users if we had:

cairo_font_face_create_from_file (const char *filename);

cairo_font_face_create_from_data (const char *data,
                                  int         len);

Is that possible with ATSUI and win32 font backends?

One issue that can be improved is the from_data() function that in cairo
design should be from_stream(), but FreeType for example doesn't have a
from_stream() API so ft implementation would have to read in the font
data first which is not optimal.

This also nicely fixes the fact that cairo.h doesn't have any font_face
constructors other than the toy API.

Comments?  Patches?


"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