[cairo] User font take 2
cworth at cworth.org
Mon May 8 12:03:04 PDT 2006
On Mon, 8 May 2006 14:28:07 -0400, "=?UTF-8?Q?Kristian_H=C3=B8gsberg?=" wrote:
> > > cairo_t *
> > > cairo_user_font_face_add_glyph(cairo_font_face_t *font_face,
> > > cairo_content_t content,
> > > cairo_text_extents_t *metrics,
> > > int ucs4,
> > > int index);
> > This has a cairo_user_font_face_ prefix but takes a cairo_font_face_t as
> > its first argument. The prefix of a method should match the object that
> > method works on. Also, the name doesn't really state that this method
> > returns a new cairo_t.
> This is unfortunate, but in line with the rest of the API.
That takes care of the first objection, but there's still the case
that add_glyph is returning a cairo_t* which looks pretty strange to
If we're creating a new object, then let's name the function
appropriately, (create_glyph ?).
And is a glyph conceptually a cairo_t* ? I wouldn't think so...
Is it conceptually a surface? Or is is a new opaque object that
perhaps has a get_surface function that can be called? I don't know.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060508/c2806864/attachment.pgp
More information about the cairo