ft2-ruby 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/ft2.c +7 -22
  3. metadata +18 -6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/ft2.c CHANGED
@@ -1025,7 +1025,7 @@ static VALUE ft_face_glyph(VALUE self) {
1025
1025
  Data_Get_Struct(self, FT_Face, face);
1026
1026
 
1027
1027
  if ((*face)->glyph)
1028
- return Data_Wrap_Struct(cGlyphSlot, 0, dont_free, (*face)->glyph);
1028
+ return Data_Wrap_Struct(cGlyphSlot, 0, dont_free, &((*face)->glyph));
1029
1029
  else
1030
1030
  return Qnil;
1031
1031
  }
@@ -1961,20 +1961,6 @@ static VALUE ft_glyphslot_next(VALUE self) {
1961
1961
  return Data_Wrap_Struct(cGlyphSlot, 0, dont_free, next);
1962
1962
  }
1963
1963
 
1964
- /*
1965
- * Get the flags of a FT2::GlyphSlot.
1966
- *
1967
- * Examples:
1968
- * flags = slot.flags
1969
- *
1970
- */
1971
- static VALUE ft_glyphslot_flags(VALUE self) {
1972
- FT_GlyphSlot *glyph;
1973
-
1974
- Data_Get_Struct(self, FT_GlyphSlot, glyph);
1975
- return INT2NUM(0); //XXX: we don't use this, and it was causing a compiler error
1976
- }
1977
-
1978
1964
  /*
1979
1965
  * Get the FT2::GlyphMetrics of a FT2::GlyphSlot object.
1980
1966
  *
@@ -2456,7 +2442,7 @@ static VALUE ft_glyph_class(VALUE self) {
2456
2442
  static VALUE ft_glyph_format(VALUE self) {
2457
2443
  FT_Glyph *glyph;
2458
2444
  Data_Get_Struct(self, FT_Glyph, glyph);
2459
- return INT2FIX((*glyph)->format);
2445
+ return INT2NUM((*glyph)->format);
2460
2446
  }
2461
2447
 
2462
2448
  /*
@@ -2800,10 +2786,10 @@ static void define_constants(void) {
2800
2786
  /* define FT2::GlyphFormat constants */
2801
2787
  /*************************************/
2802
2788
  mGlyphFormat = rb_define_module_under(mFt2, "GlyphFormat");
2803
- rb_define_const(mGlyphFormat, "COMPOSITE", INT2FIX(ft_glyph_format_composite));
2804
- rb_define_const(mGlyphFormat, "BITMAP", INT2FIX(ft_glyph_format_bitmap));
2805
- rb_define_const(mGlyphFormat, "OUTLINE", INT2FIX(ft_glyph_format_outline));
2806
- rb_define_const(mGlyphFormat, "PLOTTER", INT2FIX(ft_glyph_format_plotter));
2789
+ rb_define_const(mGlyphFormat, "COMPOSITE", INT2NUM(ft_glyph_format_composite));
2790
+ rb_define_const(mGlyphFormat, "BITMAP", INT2NUM(ft_glyph_format_bitmap));
2791
+ rb_define_const(mGlyphFormat, "OUTLINE", INT2NUM(ft_glyph_format_outline));
2792
+ rb_define_const(mGlyphFormat, "PLOTTER", INT2NUM(ft_glyph_format_plotter));
2807
2793
 
2808
2794
  /**********************************/
2809
2795
  /* define FT2::Encoding constants */
@@ -3057,7 +3043,6 @@ void Init_ft2(void) {
3057
3043
  rb_define_method(cGlyphSlot, "library", ft_glyphslot_library, 0);
3058
3044
  rb_define_method(cGlyphSlot, "face", ft_glyphslot_face, 0);
3059
3045
  rb_define_method(cGlyphSlot, "next", ft_glyphslot_next, 0);
3060
- rb_define_method(cGlyphSlot, "flags", ft_glyphslot_flags, 0);
3061
3046
  rb_define_method(cGlyphSlot, "metrics", ft_glyphslot_metrics, 0);
3062
3047
 
3063
3048
  rb_define_method(cGlyphSlot, "h_advance", ft_glyphslot_h_advance, 0);
@@ -3136,7 +3121,7 @@ void Init_ft2(void) {
3136
3121
 
3137
3122
  rb_define_method(cGlyph, "transform", ft_glyph_transform, 2);
3138
3123
 
3139
- rb_define_method(cGlyph, "cbox", ft_glyph_cbox, 2);
3124
+ rb_define_method(cGlyph, "cbox", ft_glyph_cbox, 1);
3140
3125
  rb_define_alias(cGlyph, "control_box", "cbox");
3141
3126
 
3142
3127
  rb_define_method(cGlyph, "to_bmap", ft_glyph_to_bmap, 3);
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ft2-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ hash: 31
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 2
10
+ version: 0.1.2
5
11
  platform: ruby
6
12
  authors:
7
13
  - Paul Duncan
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-02-10 00:00:00 -05:00
18
+ date: 2010-10-13 00:00:00 -07:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -45,24 +51,30 @@ rdoc_options:
45
51
  require_paths:
46
52
  - lib
47
53
  required_ruby_version: !ruby/object:Gem::Requirement
54
+ none: false
48
55
  requirements:
49
56
  - - ">="
50
57
  - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
51
61
  version: "0"
52
- version:
53
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
+ none: false
54
64
  requirements:
55
65
  - - ">="
56
66
  - !ruby/object:Gem::Version
67
+ hash: 3
68
+ segments:
69
+ - 0
57
70
  version: "0"
58
- version:
59
71
  requirements: []
60
72
 
61
73
  rubyforge_project:
62
- rubygems_version: 1.3.5
74
+ rubygems_version: 1.3.7
63
75
  signing_key:
64
76
  specification_version: 3
65
77
  summary: Ruby libraries to FreeType2
66
78
  test_files:
67
- - examples/name_list.rb
68
79
  - examples/test_ft2.rb
80
+ - examples/name_list.rb