Sgss_Font_Truetype_Metrics
Represents an aggregation of TrueType font and glyph metrics

Description

Class diagram:
Sgss_Font_Metrics_Abstract
 + Sgss_Font_Truetype_Metrics
Used by:
Sgss_Font_Truetype::__construct()
Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
Usedby:
Sgss_Font_Truetype::__construct()
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Font/Truetype/Metrics.php (line 56)

Class overview

Variables

protected int $_ascent

Ascent in EM square grid of this font

protected int $_capHeight

Cap height in EM square grid of this font

protected int $_descent

Descent in EM square grid of this font

protected int $_lineGap

Line gap in EM square grid of this font

protected int $_maxAdvance

Maximum advance in EM square grid of every glyphs in this font

protected int $_maxAscent

Maximum ascent in EM square grid of every glyphs in this font

protected int $_maxDescent

Maximum descent in EM square grid of every glyphs in this font

protected int $_numGlyphs

Number of glyphs in this font

protected int $_numMetrics

Number of glyph metrices in this font

protected int $_scaler

Number of grids per EM length

protected int $_xHeight

X height in EM square grid of this font

Inherited from Sgss_Font_Metrics_Abstract:
Sgss_Font_Metrics_Abstract::$_missingGlyph

Methods

__construct (Sgss_Font_Cache $cache)

The constructor

float getAscent ()

Returns the ascent of this font

float getCapHeight ()

Returns the cap height of this font

float getDescent ()

Returns the descent of this font

Sgss_Font_Metrics_Glyph getGlyph (int $glyphCode)

Returns the glyph metrics corresponding to the specified glyph code in this font

float getLineGap ()

Returns the line gap of this font

float getMaxAdvance ()

Returns the maximum advance of every glyphs in this font

float getMaxAscent ()

Returns the maximum ascent of every glyphs in this font

float getMaxDescent ()

Returns the maximum descent of every glyphs in this font

float getXHeight ()

Returns the x height of this font

Inherited from Sgss_Font_Metrics_Abstract:
__construct(), getGlyphs()

Variable detail

$_ascent 

Ascent in EM square grid of this font

Signature:
protected int $_ascent


$_capHeight 

Cap height in EM square grid of this font

Signature:
protected int $_capHeight


$_descent 

Descent in EM square grid of this font

Signature:
protected int $_descent


$_lineGap 

Line gap in EM square grid of this font

Signature:
protected int $_lineGap


$_maxAdvance 

Maximum advance in EM square grid of every glyphs in this font

Signature:
protected int $_maxAdvance


$_maxAscent 

Maximum ascent in EM square grid of every glyphs in this font

Signature:
protected int $_maxAscent


$_maxDescent 

Maximum descent in EM square grid of every glyphs in this font

Signature:
protected int $_maxDescent


$_numGlyphs 

Number of glyphs in this font

Signature:
protected int $_numGlyphs


$_numMetrics 

Number of glyph metrices in this font

Signature:
protected int $_numMetrics


$_scaler 

Number of grids per EM length

Signature:
protected int $_scaler


$_xHeight 

X height in EM square grid of this font

Signature:
protected int $_xHeight


Method detail

__construct

The constructor

Parameters:
Overrides:
Signature:
public __construct (Sgss_Font_Cache $cache)


getAscent

Returns the ascent of this font

Returns:
float -- Ascent of this font
Related subject:
Sgss_Font_Metrics_Interface::getAscent()
Signature:
public float getAscent ()


getCapHeight

Returns the cap height of this font

Returns:
float -- Cap height of this font
Related subject:
Sgss_Font_Metrics_Interface::getCapHeight()
Signature:
public float getCapHeight ()


getDescent

Returns the descent of this font

Returns:
float -- Descent of this font
Related subject:
Sgss_Font_Metrics_Interface::getDescent()
Signature:
public float getDescent ()


getGlyph

Returns the glyph metrics corresponding to the specified glyph code in this font

Parameters:
  • int $glyphCode

    Glyph code

Returns:
Sgss_Font_Metrics_Glyph -- Glyph metrics corresponding to the glyph code
Related subject:
Sgss_Font_Metrics_Interface::getGlyph()
Signature:
public Sgss_Font_Metrics_Glyph getGlyph (int $glyphCode)


getLineGap

Returns the line gap of this font

Returns:
float -- Line gap of this font
Related subject:
Sgss_Font_Metrics_Interface::getLineGap()
Signature:
public float getLineGap ()


getMaxAdvance

Returns the maximum advance of every glyphs in this font

Returns:
float -- Maximum advance of every glyphs in this font
Related subject:
Sgss_Font_Metrics_Interface::getMaxAdvance()
Signature:
public float getMaxAdvance ()


getMaxAscent

Returns the maximum ascent of every glyphs in this font

Returns:
float -- Maximum ascent of every glyphs in this font
Related subject:
Sgss_Font_Metrics_Interface::getMaxAscent()
Signature:
public float getMaxAscent ()


getMaxDescent

Returns the maximum descent of every glyphs in this font

Returns:
float -- Maximum descent of every glyphs in this font
Related subject:
Sgss_Font_Metrics_Interface::getMaxDescent()
Signature:
public float getMaxDescent ()


getXHeight

Returns the x height of this font

Returns:
float -- X height of this font
Related subject:
Sgss_Font_Metrics_Interface::getXHeight()
Signature:
public float getXHeight ()