class Cairo::UserFontFace
Public Class Methods
new()
click to toggle source
static VALUE
cr_user_font_face_initialize (VALUE self)
{
cairo_font_face_t *face;
face = cairo_user_font_face_create ();
cr_font_face_check_status (face);
cairo_font_face_set_user_data (face, &ruby_object_key, (void *)self, NULL);
cairo_user_font_face_set_init_func
(face, cr_user_font_face_init_func);
cairo_user_font_face_set_render_glyph_func
(face, cr_user_font_face_render_glyph_func);
#if CAIRO_CHECK_VERSION(1, 17, 6)
cairo_user_font_face_set_render_color_glyph_func
(face, cr_user_font_face_render_color_glyph_func);
#endif
cairo_user_font_face_set_text_to_glyphs_func
(face, cr_user_font_face_text_to_glyphs_func);
cairo_user_font_face_set_unicode_to_glyph_func
(face, cr_user_font_face_unicode_to_glyph_func);
rb_ivar_set (self, cr_id_init, Qnil);
rb_ivar_set (self, cr_id_render_glyph, Qnil);
rb_ivar_set (self, cr_id_text_to_glyphs, Qnil);
rb_ivar_set (self, cr_id_unicode_to_glyph, Qnil);
RTYPEDDATA_DATA (self) = face;
return Qnil;
}
Public Instance Methods
on_init()
click to toggle source
static VALUE
cr_user_font_face_on_init (VALUE self)
{
rb_ivar_set (self, cr_id_init, rb_block_proc ());
return self;
}
on_render_color_glyph()
click to toggle source
static VALUE
cr_user_font_face_on_render_color_glyph (VALUE self)
{
rb_ivar_set (self, cr_id_render_color_glyph, rb_block_proc ());
return self;
}
on_render_glyph()
click to toggle source
static VALUE
cr_user_font_face_on_render_glyph (VALUE self)
{
rb_ivar_set (self, cr_id_render_glyph, rb_block_proc ());
return self;
}
on_text_to_glyphs()
click to toggle source
static VALUE
cr_user_font_face_on_text_to_glyphs (VALUE self)
{
rb_ivar_set (self, cr_id_text_to_glyphs, rb_block_proc ());
return self;
}
on_unicode_to_glyph()
click to toggle source
static VALUE
cr_user_font_face_on_unicode_to_glyph (VALUE self)
{
rb_ivar_set (self, cr_id_unicode_to_glyph, rb_block_proc ());
return self;
}