Sgss_Font_Metrics_Composite
Represents an aggregation of font and glyph metrics for composite font

Description

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

Class overview

Variables

protected Sgss_Font_Metrics_Interface $_metrics

Metrics of the parent font

protected Sgss_Font_Composite_Rangemap_Abstract $_rangemap

Character code range map of this font

Inherited from Sgss_Font_Metrics_Abstract:
Sgss_Font_Metrics_Abstract::$_missingGlyph

Methods

__construct (Sgss_Font_Composite_Rangemap_Abstract $rangemap)

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

$_metrics 

Metrics of the parent font

Signature:
protected Sgss_Font_Metrics_Interface $_metrics


$_rangemap 

Character code range map of this font

Signature:
protected Sgss_Font_Composite_Rangemap_Abstract $_rangemap


Method detail

__construct

The constructor

Parameters:
Overrides:
Uses:
Sgss_Font_Metrics_Abstract::__construct()
Signature:
public __construct (Sgss_Font_Composite_Rangemap_Abstract $rangemap)


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 subjects:
Sgss_Font_Metrics_Interface::getGlyph(), Sgss_Font_Mapper_Composite::charToGlyph()
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 ()