X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fruby%2Fgfx.c;fp=lib%2Fruby%2Fgfx.c;h=5ea59cd301f6780411bcf7b0a7b646eb9b1c282e;hp=ce11f02983bdba7fcdae11b219027cde59af8811;hb=f796f8818a33d519d057009043c71a2e80f6bdf1;hpb=114fd977a15dcc7a9b52700279576cba80e6dc09 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);