Class: FT2::SizeMetrics
- Inherits:
-
Object
- Object
- FT2::SizeMetrics
- Defined in:
- ext/ft2-ruby/ft2.c
Class Method Summary collapse
-
.initialize ⇒ Object
Constructor for FT2::SizeMetrics class.
Instance Method Summary collapse
-
#x_ppem ⇒ Object
Get the X pixels per EM of this FT2::SizeMetrics object.
-
#x_scale ⇒ Object
Get the horizontal scale of a FT2::SizeMetrics object.
-
#y_ppem ⇒ Object
Get the Y pixels per EM of this FT2::SizeMetrics object.
-
#y_scale ⇒ Object
Get the vertical scale of a FT2::SizeMetrics object.
Class Method Details
.initialize ⇒ Object
Constructor for FT2::SizeMetrics 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).
2300 2301 2302 |
# File 'ext/ft2-ruby/ft2.c', line 2300 static VALUE ft_size_metrics_init(VALUE self) { return self; } |
Instance Method Details
#x_ppem ⇒ Object
Get the X pixels per EM of this FT2::SizeMetrics object.
Description:
x_ppem stands for the size in integer pixels of the EM square.
which also is the horizontal character pixel size.
Examples:
x_ppem = face.size.metrics.x_ppem
2315 2316 2317 2318 2319 |
# File 'ext/ft2-ruby/ft2.c', line 2315
static VALUE ft_size_metrics_x_ppem(VALUE self) {
FT_Size_Metrics *size_metrics;
Data_Get_Struct(self, FT_Size_Metrics, size_metrics);
return INT2FIX((int) (*size_metrics).x_ppem);
}
|
#x_scale ⇒ Object
Get the horizontal scale of a FT2::SizeMetrics object.
Description:
Scale that is used to directly scale horizontal distances from
design space to 1/64th of device pixels.
Examples:
x_scale = face.size.metrics.x_scale
2349 2350 2351 2352 2353 |
# File 'ext/ft2-ruby/ft2.c', line 2349
static VALUE ft_size_metrics_x_scale(VALUE self) {
FT_Size_Metrics *size_metrics;
Data_Get_Struct(self, FT_Size_Metrics, size_metrics);
return INT2FIX((int) (*size_metrics).x_scale);
}
|
#y_ppem ⇒ Object
Get the Y pixels per EM of this FT2::SizeMetrics object.
Description:
y_ppem stands for the size in integer pixels of the EM square.
which also is the vertical character pixel size.
Examples:
y_ppem = face.size.metrics.y_ppem
2332 2333 2334 2335 2336 |
# File 'ext/ft2-ruby/ft2.c', line 2332
static VALUE ft_size_metrics_y_ppem(VALUE self) {
FT_Size_Metrics *size_metrics;
Data_Get_Struct(self, FT_Size_Metrics, size_metrics);
return INT2FIX((int) (*size_metrics).y_ppem);
}
|
#y_scale ⇒ Object
Get the vertical scale of a FT2::SizeMetrics object.
Description:
Scale that is used to directly scale vertical distances from
design space to 1/64th of device pixels.
Examples:
y_scale = face.size.metrics.y_scale
2366 2367 2368 2369 2370 |
# File 'ext/ft2-ruby/ft2.c', line 2366
static VALUE ft_size_metrics_y_scale(VALUE self) {
FT_Size_Metrics *size_metrics;
Data_Get_Struct(self, FT_Size_Metrics, size_metrics);
return INT2FIX((int) (*size_metrics).y_scale);
}
|