[cairo] User font feature
behdad at cs.toronto.edu
Sun Apr 9 23:09:42 PDT 2006
On Mon, 10 Apr 2006, Kristian Høgsberg wrote:
> No, the keys are pointers not integers. The idea is that you use the
> address of a static cairo_user_data_key_t object which will always be
> unique. And I'm not sure I see the problem in doing:
Ok I see now. My fault.
> face = cairo_user_font_face_create(...);
> cairo_font_face_set_user_data (face, &pdf_type3_font_key,
> pdf_type3_object,, pdf_type3_object_destroy);
> We shouldn't need to call any user provided callbacks from
> cairo_user_font_face_create(), so I don't see the problem in setting
> the user data after creation.
I still see. You need to set the same key that your callbacks
get. I still like my separation of a font class, face, and
scaled font. They can use the user_data mechanism internally, if
that doesn't affect performance.
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
More information about the cairo