UserFontFace

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.

Constructors

this
this(cairo_font_face_t* cairo_font_face)

Sets our main struct and passes it to the parent class

Members

Functions

getInitFunc
cairo_user_scaled_font_init_func_t getInitFunc()

Gets the scaled-font initialization function of a user-font. Since 1.8

getRenderGlyphFunc
cairo_user_scaled_font_render_glyph_func_t getRenderGlyphFunc()

Gets the glyph rendering function of a user-font. Since 1.8

getStruct
void* getStruct()

the main Gtk struct as a void*

getTextToGlyphsFunc
cairo_user_scaled_font_text_to_glyphs_func_t getTextToGlyphsFunc()

Gets the text-to-glyphs conversion function of a user-font. Since 1.8

getUnicodeToGlyphFunc
cairo_user_scaled_font_unicode_to_glyph_func_t getUnicodeToGlyphFunc()

Gets the unicode-to-glyph conversion function of a user-font. Since 1.8

getUserFontFaceStruct
cairo_font_face_t* getUserFontFaceStruct()

Get the main Gtk struct

setInitFunc
void setInitFunc(cairo_user_scaled_font_init_func_t initFunc)

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. Since 1.8

setRenderGlyphFunc
void setRenderGlyphFunc(cairo_user_scaled_font_render_glyph_func_t renderGlyphFunc)

Sets the glyph rendering function of a user-font. See cairo_user_scaled_font_render_glyph_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. The render_glyph callback is the only mandatory callback of a user-font. If the callback is NULL and a glyph is tried to be rendered using font_face, a CAIRO_STATUS_USER_FONT_ERROR will occur. Since 1.8

setTextToGlyphsFunc
void setTextToGlyphsFunc(cairo_user_scaled_font_text_to_glyphs_func_t textToGlyphsFunc)

Sets th text-to-glyphs conversion function of a user-font. See cairo_user_scaled_font_text_to_glyphs_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. Since 1.8

setUnicodeToGlyphFunc
void setUnicodeToGlyphFunc(cairo_user_scaled_font_unicode_to_glyph_func_t unicodeToGlyphFunc)

Sets the unicode-to-glyph conversion function of a user-font. See cairo_user_scaled_font_unicode_to_glyph_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. Since 1.8

Static functions

create
UserFontFace create()

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_data() and access it from the user-font callbacks by using cairo_scaled_font_get_font_face() followed by cairo_font_face_get_user_data(). Since 1.8

Variables

cairo_font_face
cairo_font_face_t* cairo_font_face;

the main Gtk struct

Meta