Font support with font data provided by the user
The user-font feature allows the cairo user to provide drawings for glyphs in a font. This is most useful in implementing fonts in non-standard formats, like SVG fonts and Flash fonts, but can also be used by games and other application to draw "funky" fonts.
Creates a new user font-face.
Use the setter functions to associate callbacks with the returned user font. The only mandatory callback is render_glyph.
After the font-face is created, the user can attach arbitrary data (the actual font data) to it using
cairo-font-face-set-user-dataand access it from the user-font callbacks by using
- a newly created
<cairo-font-face-t>. Free with
cairo-font-face-destroywhen you are done using it.
Sets the scaled-font initialization function of a user-font. See
<cairo-user-scaled-font-init-func-t>for details of how the callback works.
The font-face should not be immutable or a ‘CAIRO_STATUS_USER_FONT_IMMUTABLE’ error will occur. A user font-face is immutable as soon as a scaled-font is created from it.
- A user font face
- The init callback, or ‘