Class: Cairo::UserFontFace
- Defined in:
- ext/cairo/rb_cairo_font_face.c
Defined Under Namespace
Classes: TextToGlyphsData
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #on_init ⇒ Object
- #on_render_glyph ⇒ Object
- #on_text_to_glyphs ⇒ Object
- #on_unicode_to_glyph ⇒ Object
Methods inherited from FontFace
freetype_supported?, quartz_supported?
Constructor Details
#initialize ⇒ Object
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'ext/cairo/rb_cairo_font_face.c', line 687
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);
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);
DATA_PTR (self) = face;
return Qnil;
}
|
Instance Method Details
#on_init ⇒ Object
716 717 718 719 720 721 |
# File 'ext/cairo/rb_cairo_font_face.c', line 716
static VALUE
cr_user_font_face_on_init (VALUE self)
{
rb_ivar_set (self, cr_id_init, rb_block_proc ());
return self;
}
|
#on_render_glyph ⇒ Object
723 724 725 726 727 728 |
# File 'ext/cairo/rb_cairo_font_face.c', line 723
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 ⇒ Object
730 731 732 733 734 735 |
# File 'ext/cairo/rb_cairo_font_face.c', line 730
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 ⇒ Object
737 738 739 740 741 742 |
# File 'ext/cairo/rb_cairo_font_face.c', line 737
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;
}
|