Class: I2CE FontMetricMultiDirection (4.0.2)

From IHRIS Wiki
Revision as of 14:56, 10 March 2010 by Litlfred (talk | contribs) (Created page with '{{otherversions|Class: I2CE_FontMetricMultiDirection}} This article describes the class ''I2CE_FontMetricMultiDirection'' . *Extends the class: [[Class: I2CE_FontMetric (4.0.2) |…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This article describes the class I2CE_FontMetricMultiDirection .

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

$direction

$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

getAscender()

get the asceneder value

getBoundingBox()

Get the bounding box $returns array $bbox of numeric. The bounding box in llx lly urx ury order

getCharacterHeight()

Gets the character height of a character

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

getCharacterWidth()

Gets the character width of a character

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

getDirection()

Function to get the font direction

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
  • Returns: array
    of mixed -- the directions

getEncoding()

Get the encoding information for the font. This is global info

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
  • Returns: float
    the length of the string

getFixedWidth()

Get the width of a character in a fixed width font (for the current direction)

getFontCharacteristic()

Get a global font characteristic @param $key

getFontSize()

Get the font size. This is global info.

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:
    • mixed $g1
      the preceeding group
    • mixed $g2
      the following group @param bool use_font_size default false --
    • $use_font_size
      • Default Value: false
  • 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:
    • mixed $ch1
      the preceeding character
    • mixed $ch2
      the following character @param bool use_font_size default false --
    • $use_font_size
      • Default Value: false
  • Returns: numeric
    the kerning value or null if there is none found

getKerningGroup()

Get the kerning groups associated to a character

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 --

getLinegap()

get the line gap value

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
  • Returns: float/int
    the length of the string

getTrackingValues()

Get the tracking values for the current font size

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
  • Returns: float
    the length of the string

isFixedWidth()

Check to see if the current font is fixed width

setAscender()

set the asceneder value

setBoundingBox()

Set the bounding box $param array $bbox of numeric. The bounding box in llx lly urx ury order

setCharacterHeight()

Sets the character height of a character

setCharacterInfo()

Sets information associated to a character

setCharacterWidth()

Sets the character width of a character

setDescender()

set the desceneder value

setDirection()

Function to set the font direction @params mixed $direction. -1 is global information, all other values are user defined directions.

setFixedHeightSize()

set the fixed height character size

setFixedWidth()

Set whether or not this is a fixed width font @parma boolean $is_fixed_width

setFixedWidthSize()

set the fixed width character size

setFontCharacteristic()

Set a font characteristic

setFontSize()

Set the font size. This is global info. @params int $size

setGlobal()

Specify that we are working with global font metric information, e.g. glpyhnames, font size, etc.

setKerningByGroup()

set the kerning values associated to a pair of groups

setKerningByPair()

set the kerning values associated to a pair of character

setKerningGroup()

Set the kerning groups associated to a character

setLinegap()

set the line gap value

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