Class | GD2::Font::TrueType |
In: |
lib/gd2/font.rb
|
Parent: | Object |
CHARMAP_UNICODE | = | 0 |
CHARMAP_SHIFT_JIS | = | 1 |
CHARMAP_BIG5 | = | 2 |
FTEX_LINESPACE | = | 1 |
FTEX_CHARMAP | = | 2 |
FTEX_RESOLUTION | = | 4 |
FTEX_DISABLE_KERNING | = | 8 |
FTEX_XSHOW | = | 16 |
FTEX_FONTPATHNAME | = | 32 |
FTEX_FONTCONFIG | = | 64 |
FTEX_RETURNFONTPATHNAME | = | 128 |
new | -> | [] |
charmap | [R] | The chosen charmap |
fontpath | [R] | The effective path to this TrueType font |
hdpi | [R] | The chosen horizontal resolution hint |
kerning | [R] | Whether kerning is desired |
linespacing | [R] | The chosen linespacing |
vdpi | [R] | The chosen vertical resolution hint |
Set whether fontconfig support should be enabled. To use this, the GD library must have been built with fontconfig support. Raises an error if fontconfig support is unavailable.
Instantiate a TrueType font given by fontname (either a pathname or a fontconfig pattern if fontconfig is enabled) and ptsize (a point size given as a floating point number).
The possible options are:
Return a hash describing the rectangle that would enclose the given string rendered in this font at the given angle. The returned hash contains the following keys:
The upper, lower, left, and right references are relative to the text of the string, regardless of the angle.