From: Matthias Kramm Date: Wed, 3 Mar 2010 00:18:56 +0000 (-0800) Subject: added save_eot() function to ruby module X-Git-Tag: version-0-9-1~120 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=f796f8818a33d519d057009043c71a2e80f6bdf1 added save_eot() function to ruby module --- diff --git a/lib/ruby/gfx.c b/lib/ruby/gfx.c index ce11f02..5ea59cd 100644 --- a/lib/ruby/gfx.c +++ b/lib/ruby/gfx.c @@ -378,6 +378,15 @@ static VALUE font_save_ttf(VALUE cls, VALUE _filename) return Qnil; } +static VALUE font_save_eot(VALUE cls, VALUE _filename) +{ + Get_Font(font,cls); + Check_Type(_filename, T_STRING); + const char*filename = StringValuePtr(_filename); + gfxfont_save_eot(font->font, filename); + return Qnil; +} + static VALUE font_kerning(VALUE cls) { Get_Font(font,cls); @@ -795,6 +804,7 @@ void Init_gfx() rb_define_method(Font, "kerning", font_kerning, 0); rb_define_method(Font, "get_kerning_table", font_kerning, 0); rb_define_method(Font, "save_ttf", font_save_ttf, 1); + rb_define_method(Font, "save_eot", font_save_eot, 1); Device = rb_define_class_under(GFX, "Device", rb_cObject); rb_define_method(Device, "startpage", noop, -1);