git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
114fd97
)
added save_eot() function to ruby module
author
Matthias Kramm
<kramm@quiss.org>
Wed, 3 Mar 2010 00:18:56 +0000
(16:18 -0800)
committer
Matthias Kramm
<kramm@quiss.org>
Wed, 3 Mar 2010 00:18:56 +0000
(16:18 -0800)
lib/ruby/gfx.c
patch
|
blob
|
history
diff --git
a/lib/ruby/gfx.c
b/lib/ruby/gfx.c
index
ce11f02
..
5ea59cd
100644
(file)
--- 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;
}
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);
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, "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);
Device = rb_define_class_under(GFX, "Device", rb_cObject);
rb_define_method(Device, "startpage", noop, -1);