Class: I2CE FontMetricMultiDirection (4.0.2)
This article describes the class I2CE_FontMetricMultiDirection .
- Extends the class: I2CE_FontMetric.
- Child Classes:
- Location: Part of the module textlayout in the package TextLayout Tools 4.0.2-release
- Source: Defined in the file lib/I2CE_FontMetricMultiDirection.php on line 23
- Author: Carl Leitner <litlfred@ibiblio.org>
Class to contain information about font metrics. Setup to handle multiple directions.
Variables
$font_metrics
protecteed @var array of I2CE_FontMetric $font_metrics contains the fonr metrics that are global or for user defined directions
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 29
- Type: protected $font_metrics
$direction
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 58
- Type: protected $direction
$directions
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 63
- Type: protected $directions
Methods
__construct()
The constructor @params array $directions of mixed the directions. the value -1 is reserved for global information array has a default value of 0 (horizontal) and 1 (vertical). Sets the direction to be $directions[0]
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 39
- Signature: public function __construct($directions,$encoding)
- Parameters:
- $directions
- I2CE_Encoding $encoding
the encoding used for the internal storage of strings/characters needs to be one that is a valid encoding for PHP multibyte strings.
getAllFontCharacteristics()
Get all the font information
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 361
- Signature: public function getAllFontCharacteristics()
getAscender()
get the asceneder value
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 558
- Signature: public function getAscender()
- Returns: numeric
$ascender *
getBoundingBox()
Get the bounding box $returns array $bbox of numeric. The bounding box in llx lly urx ury order
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 297
- Signature: public function getBoundingBox()
getCharacterHeight()
Gets the character height of a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 186
- Signature: public function getCharacterHeight($ch,$use_font_size)
- Parameters:
- mixed $ch
a character @param bool use_font_size default false -- - $use_font_size
- Default Value: false
- mixed $ch
- Returns: float
the width
getCharacterHeights()
Get the character heights
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 244
- Signature: public function getCharacterHeights()
- Returns: array
of number, the values of which are the heights and the keys of which are some combination of glpyh names, character codes, and unicodes codepoints, or characters
getCharacterInfo()
Get information associated to a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 130
- Signature: public function getCharacterInfo($ch,$key)
- Parameters:
- Returns: mixed
$value
getCharacterWidth()
Gets the character width of a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 172
- Signature: public function getCharacterWidth($ch,$use_font_size)
- Parameters:
- mixed $ch
a character @param bool use_font_size default false -- - $use_font_size
- Default Value: false
- mixed $ch
- Returns: float
the width
getCharacterWidths()
Get the character widths
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 229
- Signature: public function getCharacterWidths()
- Returns: array
of number, the values of which are the widths and the keys of which are some combination of glpyh names, character codes, and unicodes codepoints, or characters
getDescender()
get the desceneder value
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 586
- Signature: public function getDescender()
- Returns: numeric
$descender *
getDirection()
Function to get the font direction
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 323
- Signature: public function getDirection()
- Returns: mixed
getDirections()
Function to get the possible directions
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 311
- Signature: public function getDirections($add_global)
- Parameters:
- boolena $add_global
(defaults to false) whether or not to include the global direction, -1- Default Value: false
- boolena $add_global
- Returns: array
of mixed -- the directions
getEncoding()
Get the encoding information for the font. This is global info
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 533
- Signature: public function getEncoding()
- Returns: I2CE_Encoding
getFixedStringWidth()
Function caluclulate the length of a fixed width string
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 102
- Signature: protected function getFixedStringWidth($string,$use_font_size)
- Parameters:
- string $string
the string we wish to calculate the length of @param bool use_font_size default false -- - $use_font_size
- Default Value: false
- string $string
- Returns: float
the length of the string
getFixedWidth()
Get the width of a character in a fixed width font (for the current direction)
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 158
- Signature: public function getFixedWidth()
- Returns: number
Returns null if called when the current font is not fixed width
getFontCharacteristic()
Get a global font characteristic @param $key
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 349
- Signature: public function getFontCharacteristic($key)
- Parameters:
- $key
- Returns: mixed
the value associated to the $key
getFontSize()
Get the font size. This is global info.
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 638
- Signature: public function getFontSize()
- Returns: int
getKerningByGroup()
get the kerning values associated to a pair of groups
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 461
- Signature: public function getKerningByGroup($g1,$g2,$use_font_size)
- Parameters:
- Returns: numeric
$kern the kerning value or null if none found
getKerningByPair()
get the kerning values associated to a pair of character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 435
- Signature: public function getKerningByPair($ch1,$ch2,$use_font_size)
- Parameters:
- Returns: numeric
the kerning value or null if there is none found
getKerningGroup()
Get the kerning groups associated to a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 406
- Signature: public function getKerningGroup($ch)
- Parameters:
- mixed $ch
the character
- mixed $ch
- Returns: mixed
the group
getKerningValue()
Return the (horizontal) kerning values for a pair of characters @params string $ch1 the left characcter @params string $ch2 the right character @param bool use_font_size default false --
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 379
- Signature: public function getKerningValue($ch1,$ch2,$use_font_size)
- Parameters:
- $ch1
- $ch2
- $use_font_size
- Default Value: false
- Returns: float
the kerning value or null if none is found
getLinegap()
get the line gap value
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 614
- Signature: public function getLinegap()
- Returns: numeric
$linegap *
getStringWidth()
Caluclulate the length of a string
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 72
- Signature: public function getStringWidth($string,$use_font_size)
- Parameters:
- string $string
the string we wish to calculate the length of @param bool use_font_size default false -- - $use_font_size
- Default Value: false
- string $string
- Returns: float/int
the length of the string
getTrackingValues()
Get the tracking values for the current font size
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 392
- Signature: public function getTrackingValues()
- Returns: array
$values of floats. $values[0] is the minimum, $values[1] is the maximum or null if if there is no tracking values
getVariableStringWidth()
Function caluclulate the length of a variable width string
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 87
- Signature: protected function getVariableStringWidth($string,$use_font_size)
- Parameters:
- string $string
the string we wish to calculate the length of @param bool use_font_size default false -- - $use_font_size
- Default Value: false
- string $string
- Returns: float
the length of the string
isFixedWidth()
Check to see if the current font is fixed width
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 114
- Signature: public function isFixedWidth()
- Returns: boolean
true if it is fixed width
setAscender()
set the asceneder value
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 542
- Signature: public function setAscender($ascender)
- Parameters:
- numeric $ascender *
setBoundingBox()
Set the bounding box $param array $bbox of numeric. The bounding box in llx lly urx ury order
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 282
- Signature: public function setBoundingBox($bbox)
- Parameters:
- $bbox
setCharacterHeight()
Sets the character height of a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 214
- Signature: public function setCharacterHeight($ch,$h)
- Parameters:
setCharacterInfo()
Sets information associated to a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 144
- Signature: public function setCharacterInfo($ch,$key,$value)
- Parameters:
setCharacterWidth()
Sets the character width of a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 201
- Signature: public function setCharacterWidth($ch,$w)
- Parameters:
setDescender()
set the desceneder value
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 570
- Signature: public function setDescender($descender)
- Parameters:
- numeric $descender *
setDirection()
Function to set the font direction @params mixed $direction. -1 is global information, all other values are user defined directions.
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 257
- Signature: public function setDirection($direction)
- Parameters:
- $direction
setFixedHeightSize()
set the fixed height character size
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 518
- Signature: public function setFixedHeightSize($height)
- Parameters:
- numeric $height
the height
- numeric $height
setFixedWidth()
Set whether or not this is a fixed width font @parma boolean $is_fixed_width
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 487
- Signature: public function setFixedWidth($is_fixed_width)
- Parameters:
- $is_fixed_width
setFixedWidthSize()
set the fixed width character size
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 502
- Signature: public function setFixedWidthSize($width)
- Parameters:
- numeric $width
the width
- numeric $width
setFontCharacteristic()
Set a font characteristic
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 333
- Signature: public function setFontCharacteristic($key,$value)
- Parameters:
setFontSize()
Set the font size. This is global info. @params int $size
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 627
- Signature: public function setFontSize($size)
- Parameters:
- $size
setGlobal()
Specify that we are working with global font metric information, e.g. glpyhnames, font size, etc.
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 273
- Signature: public function setGlobal()
setKerningByGroup()
set the kerning values associated to a pair of groups
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 471
- Signature: public function setKerningByGroup($g1,$g2,$kern)
- Parameters:
setKerningByPair()
set the kerning values associated to a pair of character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 444
- Signature: public function setKerningByPair($ch1,$ch2,$kern)
- Parameters:
setKerningGroup()
Set the kerning groups associated to a character
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 418
- Signature: public function setKerningGroup($ch,$group)
- Parameters:
setLinegap()
set the line gap value
- Defined in textlayout/lib/I2CE_FontMetricMultiDirection.php on line 598
- Signature: public function setLinegap($linegap)
- Parameters:
- numeric $linegap *
Inherited Variables
$character_widths
Theis public variable is inherited from I2CE_FontMetric->$character_widths
$character_heights
Theis public variable is inherited from I2CE_FontMetric->$character_heights
$character_info
Theis public variable is inherited from I2CE_FontMetric->$character_info
$bbox
Theis protected variable is inherited from I2CE_FontMetric->$bbox
$ascender
Theis protected variable is inherited from I2CE_FontMetric->$ascender
$descender
Theis protected variable is inherited from I2CE_FontMetric->$descender
$linegap
Theis protected variable is inherited from I2CE_FontMetric->$linegap
$is_fixed_width
Theis protected variable is inherited from I2CE_FontMetric->$is_fixed_width
$fixed_character_width
Theis protected variable is inherited from I2CE_FontMetric->$fixed_character_width
$fixed_character_height
Theis protected variable is inherited from I2CE_FontMetric->$fixed_character_height
$size
Theis protected variable is inherited from I2CE_FontMetric->$size
$encoding
Theis protected variable is inherited from I2CE_FontMetric->$encoding
$kerning_table_pairs
Theis protected variable is inherited from I2CE_FontMetric->$kerning_table_pairs
$kerning_table_groups
Theis protected variable is inherited from I2CE_FontMetric->$kerning_table_groups
$kerning_groups
Theis protected variable is inherited from I2CE_FontMetric->$kerning_groups
$font_info
Theis protected variable is inherited from I2CE_FontMetric->$font_info