Sgss_Font_Metrics_Glyph
Represents an encapsuled glyph metrics

Description

Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Font/Metrics/Glyph.php (line 67)

Class overview

Accessors

read-only int $code

Character code corresponding to this glyph

read-only float $top

Top edge location of the bounding recrangle of this glyph

read-only float $right

Right edge location of the bounding recrangle of this glyph

read-only float $bottom

Bottom edge location of the bounding recrangle of this glyph

read-only float $left

Left edge location of the bounding recrangle of this glyph

read-only float $advance

Advance of this glyph

read-only float $lsb

Left side bearing of this glyph

read-only float $rsb

Right side bearing of this glyph

read-only float $tsb

Top side bearing of this glyph

read-only float $bsb

Bottom side bearing of this glyph

read-only float $width

Width of the bounding rectangle of this glyph

read-only float $height

Height of the bounding rectangle of this glyph

read-only boolean $vertical

Whether this represents vertical metrics

Variables

protected float $_advance

Advance of this glyph

protected float $_bottom

Bottom edge location of the bounding recrangle of this glyph

protected int $_code

Character code corresponding to this glyph

protected float $_left

Left edge location of the bounding recrangle of this glyph

protected float $_right

Right edge location of the bounding recrangle of this glyph

protected float $_top

Top edge location of the bounding recrangle of this glyph

protected boolean $_vertical

Whether this represents vertical metrics

Methods

__construct (int $code, float $advance, float $top, float $right, float $bottom, float $left, [boolean $vertical = false])

The constructor

float getAdvance ()

Returns the top edge location of the bounding recrangle of this glyph

float getBsb ()

Returns the bottom side bearing of this glyph

int getCode ()

Returns the character code corresponding to this glyph

float getHeight ()

Returns the height of the bounding rectangle of this glyph

float getLsb ()

Returns the left side bearing of this glyph

float getRsb ()

Returns the right side bearing of this glyph

float getTsb ()

Returns the top side bearing of this glyph

float getWidth ()

Returns the width of the bounding rectangle of this glyph

boolean isVertical ()

Determines whether this represents vertical metrics

mixed __get (mixed $name)
string __toString ()

Variable detail

$_advance 

Advance of this glyph

Signature:
protected float $_advance


$_bottom 

Bottom edge location of the bounding recrangle of this glyph

Signature:
protected float $_bottom


$_code 

Character code corresponding to this glyph

Signature:
protected int $_code


$_left 

Left edge location of the bounding recrangle of this glyph

Signature:
protected float $_left


$_right 

Right edge location of the bounding recrangle of this glyph

Signature:
protected float $_right


$_top 

Top edge location of the bounding recrangle of this glyph

Signature:
protected float $_top


$_vertical 

Whether this represents vertical metrics

Signature:
protected boolean $_vertical


Method detail

__construct

The constructor

Parameters:
  • int $code

    Character code corresponding to the glyph

  • float $advance

    Advance of this glyph

  • float $top

    Top edge location of the bounding recrangle

  • float $right

    Right edge location of the bounding recrangle

  • float $bottom

    Bottom edge location of the bounding recrangle

  • float $left

    Left edge location of the bounding recrangle

  • boolean $vertical

    Whether this represents vertical metrics

Signature:
public __construct (int $code, float $advance, float $top, float $right, float $bottom, float $left, [boolean $vertical = false])


getAdvance

Returns the top edge location of the bounding recrangle of this glyph

Returns:
float -- Top edge location of the bounding recrangle
Signature:
public float getAdvance ()


getBsb

Returns the bottom side bearing of this glyph

Returns:
float -- Bottom side bearing of this glyph
Signature:
public float getBsb ()


getCode

Returns the character code corresponding to this glyph

Returns:
int -- Character code corresponding to this glyph
Signature:
public int getCode ()


getHeight

Returns the height of the bounding rectangle of this glyph

Returns:
float -- Height of the bounding rectangle
Signature:
public float getHeight ()


getLsb

Returns the left side bearing of this glyph

Returns:
float -- Left side bearing of this glyph
Signature:
public float getLsb ()


getRsb

Returns the right side bearing of this glyph

Returns:
float -- Right side bearing of this glyph
Signature:
public float getRsb ()


getTsb

Returns the top side bearing of this glyph

Returns:
float -- Top side bearing of this glyph
Signature:
public float getTsb ()


getWidth

Returns the width of the bounding rectangle of this glyph

Returns:
float -- Width of the bounding rectangle
Signature:
public float getWidth ()


isVertical

Determines whether this represents vertical metrics

Returns:
boolean -- True when this represents vertical metrics
Signature:
public boolean isVertical ()


__get

Parameters:
  • mixed $name
Signature:
public mixed __get (mixed $name)


__toString

Signature:
public string __toString ()