Class: I2CE FontMetric: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 1: Line 1:
This article desrcibes the class '''I2CE_FontMetric'''
This article desrcibes the class '''I2CE_FontMetric'''.
It is contained in the module [[iHRIS Module List#textlayout|textlayout]] in the package [https://launchpad.net/textlayout TextLayout Tools]
It is contained in the module [[iHRIS Module List#textlayout|textlayout]] in the package [https://launchpad.net/textlayout TextLayout Tools]


Line 90: Line 90:
get the asceneder value
get the asceneder value
*Signature: public function getAscender()
*Signature: public function getAscender()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric] $ascender
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $ascender
*
*
===getBoundingBox()===
===getBoundingBox()===
Line 100: Line 100:
@param bool use_font_size default false --
@param bool use_font_size default false --
*Signature: public function getCharacterHeight($ch,$use_font_size)
*Signature: public function getCharacterHeight($ch,$use_font_size)
*Returns: [http://www.php.net/manual/en/language.types.float.php float] the width
*Returns: [http://www.php.net/manual/en/language.types.float.php float ] the width
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>a character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>a character
*$use_font_size  
*$use_font_size  
**Default Value: false
**Default Value: false
Line 108: Line 108:
Get the character heights
Get the character heights
*Signature: public function getCharacterHeights()
*Signature: public function getCharacterHeights()
*Returns: [http://www.php.net/manual/en/language.types.array.php array] of number, the values of which are the heights
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] of number, the values of which are the heights
and the keys of which are some combination of
and the keys of which are some combination of
glpyh names, character codes, and unicodes codepoints, or characters
glpyh names, character codes, and unicodes codepoints, or characters
Line 114: Line 114:
Get information associated to  a character
Get information associated to  a character
*Signature: public function getCharacterInfo($ch,$key)
*Signature: public function getCharacterInfo($ch,$key)
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed] $value
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $key
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $key
===getCharacterWidth()===
===getCharacterWidth()===
Gets the character width of a character
Gets the character width of a character
@param bool use_font_size default false --
@param bool use_font_size default false --
*Signature: public function getCharacterWidth($ch,$use_font_size)
*Signature: public function getCharacterWidth($ch,$use_font_size)
*Returns: [http://www.php.net/manual/en/language.types.float.php float] the width
*Returns: [http://www.php.net/manual/en/language.types.float.php float ] the width
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>a character (or glyphname)
*$use_font_size  
*$use_font_size  
**Default Value: false
**Default Value: false
Line 130: Line 130:
Get the character widths
Get the character widths
*Signature: public function getCharacterWidths()
*Signature: public function getCharacterWidths()
*Returns: [http://www.php.net/manual/en/language.types.array.php array] of number, the values of which are the widths
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] of number, the values of which are the widths
and the keys of which are some combination of
and the keys of which are some combination of
glpyh names, character codes, and unicodes codepoints, or characters
glpyh names, character codes, and unicodes codepoints, or characters
Line 136: Line 136:
get the desceneder value
get the desceneder value
*Signature: public function getDescender()
*Signature: public function getDescender()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric] $descender
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $descender
*
*
===getEncoding()===
===getEncoding()===
Get the encoding used for the internal storage of strings/characters
Get the encoding used for the internal storage of strings/characters
*Signature: public function getEncoding()
*Signature: public function getEncoding()
*Returns: [http://www.php.net/manual/en/language.types.string.php string]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===getFixedStringWidth()===
===getFixedStringWidth()===
Caluclulate the length of a fixed width string
Caluclulate the length of a fixed width string
Line 147: Line 147:
*Returns: float/int the length of the string
*Returns: float/int the length of the string
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.types.string.php string] $string<br/>the string we wish to calculate the length of
* [http://www.php.net/manual/en/language.types.string.php string ] $string<br/>the string we wish to calculate the length of
===getFixedWidth()===
===getFixedWidth()===
Get the width of a character in a fixed width font
Get the width of a character in a fixed width font
Line 156: Line 156:
@param $key
@param $key
*Signature: public function getFontCharacteristic($key)
*Signature: public function getFontCharacteristic($key)
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed]  the value associated to the $key
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]  the value associated to the $key
Parameters:
Parameters:
*$key  
*$key  
Line 162: Line 162:
Get the font size
Get the font size
*Signature: public function getFontSize()
*Signature: public function getFontSize()
*Returns: [http://www.php.net/manual/en/language.types.integer.php int]
*Returns: [http://www.php.net/manual/en/language.types.integer.php int ]
===getKerningByGroup()===
===getKerningByGroup()===
get the kerning values associated to a pair of groups
get the kerning values associated to a pair of groups
@param bool use_font_size default false --
@param bool use_font_size default false --
*Signature: public function getKerningByGroup($g1,$g2,$use_font_size)
*Signature: public function getKerningByGroup($g1,$g2,$use_font_size)
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric] $kern  the kerning value or null if none found
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $kern  the kerning value or null if none found
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $g1<br/>the preceeding group
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $g1<br/>the preceeding group
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $g2<br/>the following group
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $g2<br/>the following group
*$use_font_size  
*$use_font_size  
**Default Value: false
**Default Value: false
Line 177: Line 177:
@param bool use_font_size default false --
@param bool use_font_size default false --
*Signature: public function getKerningByPair($ch1,$ch2,$use_font_size)
*Signature: public function getKerningByPair($ch1,$ch2,$use_font_size)
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric] the kerning value or null if there is none found
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric ] the kerning value or null if there is none found
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch1<br/>the preceeding character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch1<br/>the preceeding character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch2<br/>the following character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch2<br/>the following character
*$use_font_size  
*$use_font_size  
**Default Value: false
**Default Value: false
Line 186: Line 186:
Get the kerning groups associated to a character
Get the kerning groups associated to a character
*Signature: public function getKerningGroup($ch)
*Signature: public function getKerningGroup($ch)
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed] the group
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ] the group
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>the character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>the character
===getKerningValue()===
===getKerningValue()===
Return the (horizontal) kerning values for a pair of characters
Return the (horizontal) kerning values for a pair of characters
Line 205: Line 205:
get the line gap value
get the line gap value
*Signature: public function getLinegap()
*Signature: public function getLinegap()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric] $linegap
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $linegap
*
*
===getStringWidth()===
===getStringWidth()===
Line 216: Line 216:
you should see TextColumn
you should see TextColumn
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.types.string.php string] $string<br/>the string we wish to calculate the length of
* [http://www.php.net/manual/en/language.types.string.php string ] $string<br/>the string we wish to calculate the length of
*$use_font_size  
*$use_font_size  
**Default Value: false
**Default Value: false
Line 222: Line 222:
Get the tracking values for the current font size
Get the tracking values for the current font size
*Signature: public function getTrackingValues()
*Signature: public function getTrackingValues()
*Returns: [http://www.php.net/manual/en/language.types.array.php array] $values of floats.  $values[0] is the minimum, $values[1] is the maximum or null if
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] $values of floats.  $values[0] is the minimum, $values[1] is the maximum or null if
if there is no tracking values
if there is no tracking values
===getVariableStringWidth()===
===getVariableStringWidth()===
Line 228: Line 228:
@param bool use_font_size default false --
@param bool use_font_size default false --
*Signature: protected function getVariableStringWidth($string)
*Signature: protected function getVariableStringWidth($string)
*Returns: [http://www.php.net/manual/en/language.types.float.php float] the length of the string
*Returns: [http://www.php.net/manual/en/language.types.float.php float ] the length of the string
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.types.string.php string] $string<br/>the string we wish to calculate the length of
* [http://www.php.net/manual/en/language.types.string.php string ] $string<br/>the string we wish to calculate the length of
===isFixedWidth()===
===isFixedWidth()===
Check to see if the current font is fixed width
Check to see if the current font is fixed width
*Signature: public function isFixedWidth()
*Signature: public function isFixedWidth()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean] true if it is fixed width
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] true if it is fixed width
===setAscender()===
===setAscender()===
set the asceneder value
set the asceneder value
Line 240: Line 240:
*Signature: public function setAscender($ascender)
*Signature: public function setAscender($ascender)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php numeric] $ascender
* [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $ascender
===setBoundingBox()===
===setBoundingBox()===
Set the bounding box
Set the bounding box
Line 251: Line 251:
*Signature: public function setCharacterHeight($ch,$h)
*Signature: public function setCharacterHeight($ch,$h)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php numeric] $h<br/>the $height
* [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $h<br/>the $height
===setCharacterInfo()===
===setCharacterInfo()===
Sets information associated to  a character
Sets information associated to  a character
*Signature: public function setCharacterInfo($ch,$key,$value)
*Signature: public function setCharacterInfo($ch,$key,$value)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $key
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $key
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $value
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
===setCharacterWidth()===
===setCharacterWidth()===
Sets the character width of a character
Sets the character width of a character
*Signature: public function setCharacterWidth($ch,$w)
*Signature: public function setCharacterWidth($ch,$w)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>a character (or glyphname)
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>a character (or glyphname)
* numeriv $w<br/>the width
* numeriv $w<br/>the width
===setDescender()===
===setDescender()===
Line 271: Line 271:
*Signature: public function setDescender($descender)
*Signature: public function setDescender($descender)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php numeric] $descender
* [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $descender
===setFixedHeightSize()===
===setFixedHeightSize()===
set the fixed height character size
set the fixed height character size
*Signature: public function setFixedHeightSize($height)
*Signature: public function setFixedHeightSize($height)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php numeric] $height<br/>the width
* [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $height<br/>the width
===setFixedWidth()===
===setFixedWidth()===
Set whether or not this is a fixed width font
Set whether or not this is a fixed width font
Line 287: Line 287:
*Signature: public function setFixedWidthSize($width)
*Signature: public function setFixedWidthSize($width)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php numeric] $width<br/>the width
* [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $width<br/>the width
===setFontCharacteristic()===
===setFontCharacteristic()===
Set a global font characteristic
Set a global font characteristic
*Signature: public function setFontCharacteristic($key,$value)
*Signature: public function setFontCharacteristic($key,$value)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.types.string.php string] $key
* [http://www.php.net/manual/en/language.types.string.php string ] $key
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $value
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $value
===setFontSize()===
===setFontSize()===
Set the font size
Set the font size
Line 305: Line 305:
*Signature: public function setKerningByGroup($g1,$g2,$kern)
*Signature: public function setKerningByGroup($g1,$g2,$kern)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $g1<br/>the preceeding group
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $g1<br/>the preceeding group
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $g2<br/>the following grou
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $g2<br/>the following grou
*$kern  
*$kern  
===setKerningByPair()===
===setKerningByPair()===
Line 313: Line 313:
*Signature: public function setKerningByPair($ch1,$ch2,$kern)
*Signature: public function setKerningByPair($ch1,$ch2,$kern)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch1<br/>the preceeding character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch1<br/>the preceeding character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch2<br/>the following character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch2<br/>the following character
*$kern  
*$kern  
===setKerningGroup()===
===setKerningGroup()===
Line 320: Line 320:
*Signature: public function setKerningGroup($ch,$group)
*Signature: public function setKerningGroup($ch,$group)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $ch<br/>the character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $ch<br/>the character
* [http://www.php.net/manual/en/language.pseudo-types.php mixed] $group<br/>the group
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $group<br/>the group
===setLinegap()===
===setLinegap()===
set the line gap value
set the line gap value
Line 327: Line 327:
*Signature: public function setLinegap($linegap)
*Signature: public function setLinegap($linegap)
Parameters:
Parameters:
* [http://www.php.net/manual/en/language.pseudo-types.php numeric] $linegap
* [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $linegap




[[Category:Class Documentation]]
[[Category:Class Documentation]]

Revision as of 22:27, 16 October 2009

This article desrcibes the class I2CE_FontMetric. It is contained in the module textlayout in the package TextLayout Tools

The class is defined in the file: lib/I2CE_FontMetric.php

Class to contain information about font metrics. @subpackage TextLayout

  • Author: Carl Leitner <litlfred@ibiblio.org>

Variables

$bbox

protected @var $bbox of numeric. the bounding box with values in order llx lly urx ury

  • Type: protected $bbox

$ascender

protected @var numeric $ascender

  • Type: protected $ascender

$descender

protected @var numeric $ascender

  • Type: protected $descender

$linegap

protected @var numeric $linegap

  • Type: protected $linegap

$is_fixed_width

protected @var array of boolean $is_fixed_width whether or not this font is fixed width

  • Type: protected $is_fixed_width

$fixed_character_width

protected @var int the size of a fixed width character

  • Type: protected $fixed_character_width

$fixed_character_height

protected @var int the size of a fixed width character

  • Type: protected $fixed_character_height

$size

protected @var int $size the font size in points

  • Type: protected $size

$encoding

proteted @var I2CE_Encoding encoding data for the character set

  • Type: protected $encoding

$kerning_table_pairs

protected @var array of array of numbers $kerning_table_pairs the kerning table for pairs. the first index is the preceeding character the second index is the following character

  • Type: protected $kerning_table_pairs

$kerning_table_groups

protected @var array of array of numbers $kerning_table_groups the kerning table for groups. the first index is the group for the preceeding character the second index is the group for the following character

  • Type: protected $kerning_table_groups

$kerning_groups

protected $var array with keys character and values the kerning groups

  • Type: protected $kerning_groups

$character_widths

of floats containing $character_widths the character widths for the current font to be super redundant the keys will be either the character code or the glyph name

  • Type: public y $character_widths

$character_heights

of array of floats $character_heights containing the character heights for the current font to be super redundant the keys will be either the character code or the glyph name

  • Type: public y $character_heights

$character_info

of array of mixed $character_info containing character information (besides the width)

  • Type: public y $character_info

$font_info

protected @var array of mixed global font information

  • Type: protected $font_info

Methods

__construct()

needs to be one that is a valid encoding for PHP multibyte strings.

  • Signature: public function __construct($encoding)

Parameters:

  • I2CE_Encoding $encoding
    the encoding used for the internal storage of strings/characters

getAllFontCharacteristics()

Get all the font information

  • Signature: public function getAllFontCharacteristics()

getAscender()

get the asceneder value

  • 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

  • Signature: public function getBoundingBox()

getCharacterHeight()

Gets the character height of a character @param bool use_font_size default false --

  • Signature: public function getCharacterHeight($ch,$use_font_size)
  • Returns: float the width

Parameters:

  • mixed $ch
    a character
  • $use_font_size
    • Default Value: false

getCharacterHeights()

Get the character heights

  • 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

  • Signature: public function getCharacterInfo($ch,$key)
  • Returns: mixed $value

Parameters:

getCharacterWidth()

Gets the character width of a character @param bool use_font_size default false --

  • Signature: public function getCharacterWidth($ch,$use_font_size)
  • Returns: float the width

Parameters:

  • mixed $ch
    a character (or glyphname)
  • $use_font_size
    • Default Value: false

getCharacterWidths()

Get the character widths

  • 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

  • Signature: public function getDescender()
  • Returns: numeric $descender

getEncoding()

Get the encoding used for the internal storage of strings/characters

  • Signature: public function getEncoding()
  • Returns: string

getFixedStringWidth()

Caluclulate the length of a fixed width string

  • Signature: protected function getFixedStringWidth($string)
  • Returns: float/int the length of the string

Parameters:

  • string $string
    the string we wish to calculate the length of

getFixedWidth()

Get the width of a character in a fixed width font

  • 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

  • Signature: public function getFontCharacteristic($key)
  • Returns: mixed the value associated to the $key

Parameters:

  • $key

getFontSize()

Get the font size

  • Signature: public function getFontSize()
  • Returns: int

getKerningByGroup()

get the kerning values associated to a pair of groups @param bool use_font_size default false --

  • Signature: public function getKerningByGroup($g1,$g2,$use_font_size)
  • Returns: numeric $kern the kerning value or null if none found

Parameters:

  • mixed $g1
    the preceeding group
  • mixed $g2
    the following group
  • $use_font_size
    • Default Value: false

getKerningByPair()

get the kerning values associated to a pair of character @param bool use_font_size default false --

  • Signature: public function getKerningByPair($ch1,$ch2,$use_font_size)
  • Returns: numeric the kerning value or null if there is none found

Parameters:

  • mixed $ch1
    the preceeding character
  • mixed $ch2
    the following character
  • $use_font_size
    • Default Value: false

getKerningGroup()

Get the kerning groups associated to a character

  • Signature: public function getKerningGroup($ch)
  • Returns: mixed the group

Parameters:

getKerningValue()

Return the (horizontal) kerning values for a pair of characters If there is kerning info for both groups and pairs, the pairs takes prescedence @params string $ch1 the left characcter @params string $ch2 the right character @param bool use_font_size default false --

  • Signature: public function getKerningValue($ch1,$ch2,$use_font_size)
  • Returns: number the kerning value or null if none is found

Parameters:

  • $ch1
  • $ch2
  • $use_font_size

getLinegap()

get the line gap value

  • Signature: public function getLinegap()
  • Returns: numeric $linegap

getStringWidth()

Caluclulate the length of a string

  • Signature: public function getStringWidth($string,$use_font_size)
  • Returns: float/int the length of the string

note: if it is a fixed width font, we assume that all characters are printable. in particular a line break is considered a printable character. If you have line breaks to deal with @param bool use_font_size default false -- you should see TextColumn Parameters:

  • string $string
    the string we wish to calculate the length of
  • $use_font_size
    • Default Value: false

getTrackingValues()

Get the tracking values for the current font size

  • 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 @param bool use_font_size default false --

  • Signature: protected function getVariableStringWidth($string)
  • Returns: float the length of the string

Parameters:

  • string $string
    the string we wish to calculate the length of

isFixedWidth()

Check to see if the current font is fixed width

  • Signature: public function isFixedWidth()
  • Returns: boolean true if it is fixed width

setAscender()

set the asceneder value

  • Signature: public function setAscender($ascender)

Parameters:

setBoundingBox()

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

  • Signature: public function setBoundingBox($bbox)

Parameters:

  • $bbox

setCharacterHeight()

Sets the character width of a character

  • Signature: public function setCharacterHeight($ch,$h)

Parameters:

setCharacterInfo()

Sets information associated to a character

  • Signature: public function setCharacterInfo($ch,$key,$value)

Parameters:

setCharacterWidth()

Sets the character width of a character

  • Signature: public function setCharacterWidth($ch,$w)

Parameters:

  • mixed $ch
    a character (or glyphname)
  • numeriv $w
    the width

setDescender()

set the desceneder value

  • Signature: public function setDescender($descender)

Parameters:

setFixedHeightSize()

set the fixed height character size

  • Signature: public function setFixedHeightSize($height)

Parameters:

setFixedWidth()

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

  • Signature: public function setFixedWidth($is_fixed_width)

Parameters:

  • $is_fixed_width

setFixedWidthSize()

set the fixed width character size

  • Signature: public function setFixedWidthSize($width)

Parameters:

setFontCharacteristic()

Set a global font characteristic

  • Signature: public function setFontCharacteristic($key,$value)

Parameters:

setFontSize()

Set the font size @params int $size

  • Signature: public function setFontSize($size)

Parameters:

  • $size

setKerningByGroup()

get the kerning values associated to a pair of groups @params numeric $kern the kerning value

  • Signature: public function setKerningByGroup($g1,$g2,$kern)

Parameters:

  • mixed $g1
    the preceeding group
  • mixed $g2
    the following grou
  • $kern

setKerningByPair()

set the kerning values associated to a pair of character @params numeric $kern the kerning value

  • Signature: public function setKerningByPair($ch1,$ch2,$kern)

Parameters:

  • mixed $ch1
    the preceeding character
  • mixed $ch2
    the following character
  • $kern

setKerningGroup()

Set the kerning groups associated to a character

  • Signature: public function setKerningGroup($ch,$group)

Parameters:

setLinegap()

set the line gap value

  • Signature: public function setLinegap($linegap)

Parameters: