|
eZ Publish
[trunk]
|
Specifies a font used for drawing text. More...
Public Member Functions | |
| eZImageFont ($family, $size, $path, $xAdjustment=0, $yAdjustment=0) | |
| family () | |
| file () | |
| path () | |
| pointSize () | |
| realFile () | |
| setAdjustment ($xAdjustment, $yAdjustment) | |
| setFamily ($family) | |
| setPath ($path) | |
| setPointSize ($size) | |
| setXAdjustment ($adjustment) | |
| setYAdjustment ($adjustment) | |
| xAdjustment () | |
| yAdjustment () | |
Static Public Member Functions | |
| static | exists ($fontFamily, $fontPath) |
| static | fontFile ($fontFamily, $fontPath) |
Public Attributes | |
| $FontFamily | |
| The current font family. | |
| $FontFile | |
| The path to the font file one was found. | |
| $FontPath | |
| The path or path array to the fonts. | |
| $PointSize | |
| The size of the font in points. | |
| $XAdjustment | |
| Adjustment in the x direction. | |
| $YAdjustment | |
| Adjustment in the y direction. | |
Private Member Functions | |
| initialize () | |
Specifies a font used for drawing text.
Font attributes are encapsulated for use with the eZImageInterface::drawText function. The class stores the family, pointsize and path. Alternatively an x and y adjustment may be specified incase the font rendering is wrong.
Typical usage:
if ( eZImageFont::exists( 'arial', 'design/standard/fonts' ) ) $font = new eZImageFont( 'arial', 30, 'design/standard/fonts' );
All attributes can be modified later on with setFamily, setPath, setPointSize, setXAdjustment and setYAdjustment.
Definition at line 29 of file ezimagefont.php.
| static eZImageFont::exists | ( | $ | fontFamily, |
| $ | fontPath | ||
| ) | [static] |
Definition at line 170 of file ezimagefont.php.
Referenced by eZTemplateImageOperator\modify().
| eZImageFont::eZImageFont | ( | $ | family, |
| $ | size, | ||
| $ | path, | ||
| $ | xAdjustment = 0, |
||
| $ | yAdjustment = 0 |
||
| ) |
Initializes the object with a family, point size and path. X and y adjustment may also be specified.
Definition at line 35 of file ezimagefont.php.
Definition at line 51 of file ezimagefont.php.
Definition at line 68 of file ezimagefont.php.
| static eZImageFont::fontFile | ( | $ | fontFamily, |
| $ | fontPath | ||
| ) | [static] |
false if no font could be used. The font must be named equal to the $fontFamily parameter with the .ttf suffix, eg. arial.ttf. | fontPath | The path to the fonts or an array of paths. |
Definition at line 191 of file ezimagefont.php.
Referenced by exists(), and initialize().
| eZImageFont::initialize | ( | ) | [private] |
Initializes the font file attribute by searching for the font.
Definition at line 179 of file ezimagefont.php.
Referenced by eZImageFont(), setFamily(), and setPath().
Definition at line 59 of file ezimagefont.php.
Definition at line 85 of file ezimagefont.php.
Similar to file but returns the absolute path to the font file. This is required for GD font handling.
Definition at line 77 of file ezimagefont.php.
| eZImageFont::setAdjustment | ( | $ | xAdjustment, |
| $ | yAdjustment | ||
| ) |
Sets the number of pixels to adjust the font output to $xAdjustment and $yAdjustment.
Definition at line 159 of file ezimagefont.php.
| eZImageFont::setFamily | ( | $ | family | ) |
Sets the font family to $family.
Definition at line 112 of file ezimagefont.php.
| eZImageFont::setPath | ( | $ | path | ) |
Sets the font path which is used when searching for fonts, the path can either be a string or an array of strings.
Definition at line 123 of file ezimagefont.php.
| eZImageFont::setPointSize | ( | $ | size | ) |
Sets the point size of the font to $size.
Definition at line 132 of file ezimagefont.php.
| eZImageFont::setXAdjustment | ( | $ | adjustment | ) |
Sets the number of pixels in the x direction to adjust the font output to $adjustment.
Definition at line 141 of file ezimagefont.php.
| eZImageFont::setYAdjustment | ( | $ | adjustment | ) |
Sets the number of pixels in the y direction to adjust the font output to $adjustment.
Definition at line 150 of file ezimagefont.php.
Definition at line 94 of file ezimagefont.php.
Definition at line 103 of file ezimagefont.php.
| eZImageFont::$FontFamily |
The current font family.
Definition at line 217 of file ezimagefont.php.
| eZImageFont::$FontFile |
The path to the font file one was found.
Definition at line 221 of file ezimagefont.php.
| eZImageFont::$FontPath |
The path or path array to the fonts.
Definition at line 219 of file ezimagefont.php.
| eZImageFont::$PointSize |
The size of the font in points.
Definition at line 223 of file ezimagefont.php.
| eZImageFont::$XAdjustment |
Adjustment in the x direction.
Definition at line 225 of file ezimagefont.php.
| eZImageFont::$YAdjustment |
Adjustment in the y direction.
Definition at line 227 of file ezimagefont.php.