Class: FT2::Size
- Inherits:
-
Object
- Object
- FT2::Size
- Defined in:
- ext/ft2-ruby/ft2.c
Class Method Summary collapse
-
.initialize ⇒ Object
Constructor for FT2::Size class.
Instance Method Summary collapse
-
#face ⇒ Object
Get the FT2::Face object this FT2::Size object is associated with.
-
#metrics ⇒ Object
Get the FT2::SizeMetrics associated with a FT2::Size object.
Class Method Details
.initialize ⇒ Object
Constructor for FT2::Size class.
This method is currently empty. You should never call this method directly unless you’re instantiating a derived class (ie, you know what you’re doing).
2247 2248 2249 |
# File 'ext/ft2-ruby/ft2.c', line 2247 static VALUE ft_size_init(VALUE self) { return self; } |
Instance Method Details
#face ⇒ Object
Get the FT2::Face object this FT2::Size object is associated with.
Examples:
face = size.face
2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 |
# File 'ext/ft2-ruby/ft2.c', line 2258
static VALUE ft_size_face(VALUE self) {
FT_Size *size;
FT_Face *face;
Data_Get_Struct(self, FT_Size, size);
face = malloc(sizeof(FT_Face));
*face = (*size)->face;
return Data_Wrap_Struct(cFace, 0, dont_free, face);
}
|
#metrics ⇒ Object
Get the FT2::SizeMetrics associated with a FT2::Size object.
Examples:
s_metrics = size.metrics
2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 |
# File 'ext/ft2-ruby/ft2.c', line 2276
static VALUE ft_size_metrics(VALUE self) {
FT_Size *size;
FT_Size_Metrics *metrics;
Data_Get_Struct(self, FT_Size, size);
metrics = malloc(sizeof(FT_Size_Metrics));
*metrics = (*size)->metrics;
return Data_Wrap_Struct(cSizeMetrics, 0, dont_free, metrics);
}
|