[cairo] cairo_font_face_create_from_file/data()
Behdad Esfahbod
behdad at behdad.org
Fri Sep 14 21:05:41 PDT 2007
On Sat, 2007-09-15 at 00:04 -0400, Behdad Esfahbod wrote:
> Hi,
>
> So, while writing the last comment in:
>
> http://bugzilla.gnome.org/show_bug.cgi?id=347237
>
> It occurred to me that it would be useful to all cairo users if we had:
>
> cairo_font_face_t
> cairo_font_face_create_from_file (const char *filename);
>
> cairo_font_face_t
> cairo_font_face_create_from_data (const char *data,
> int len);
To clarify, these will return regular font faces. No new
font_face_type_t required.
> 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?
>
>
--
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