From f796f8818a33d519d057009043c71a2e80f6bdf1 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Tue, 2 Mar 2010 16:18:56 -0800 Subject: [PATCH] added save_eot() function to ruby module --- lib/ruby/gfx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- 1.7.10.4