Sgss_Font_Truetype_Directory
Represents the TrueType table directory

Description

Implements:
Countable (internal interface), ArrayAccess (internal interface)
Used by:
Sgss_Font_Truetype_Parser::_parseHeader()
Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
Usedby:
Sgss_Font_Truetype_Parser::_parseHeader()
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Font/Truetype/Directory.php (line 46)

Class overview

Variable

protected array $_entries

Entries in this table directory

Methods

void add (int $tag, int $offset, int $length)

Inserts or replaces the entry specified by the parameters into this table directory

void addEntry (Sgss_Font_Truetype_Directory_Entry $entry)

Inserts or replaces the specified entry into this table directory

int count ()
Sgss_Font_Truetype_Directory_Entry|null getEntry (int $tag)

Returns the specified entry in this table directory

int getLength (int $tag)

Returns the length of the specified entry in this table directory

string|null getName (int $tag)

Returns the name of the specified entry in this table directory

int getOffset (int $tag)

Returns the offset to the specified entry in this table directory

boolean offsetExists (mixed $offset)
mixed offsetGet (mixed $offset)
mixed offsetSet (mixed $offset, mixed $value)
void offsetUnset (mixed $offset)

Variable detail

$_entries 

Entries in this table directory

Signature:
protected array $_entries = array()


Method detail

add

Inserts or replaces the entry specified by the parameters into this table directory

Parameters:
  • int $tag

    Tag identifier of the entry to be inserted

  • int $offset

    Offset in byte to the entry to be inserted

  • int $length

    Length in byte of the entry to be inserted

Uses:
Sgss_Font_Truetype_Directory_Entry
Signature:
public void add (int $tag, int $offset, int $length)


addEntry

Inserts or replaces the specified entry into this table directory

Parameters:
Signature:
public void addEntry (Sgss_Font_Truetype_Directory_Entry $entry)


count

Specified by:
  • Countable::count
Related subject:
Countable::count()
Signature:
public int count ()


getEntry

Returns the specified entry in this table directory

Parameters:
  • int $tag

    Tag identifier of the entry to be retrieved

Returns:
Sgss_Font_Truetype_Directory_Entry|null -- Retrieved entry, or null if not found
Signature:
public Sgss_Font_Truetype_Directory_Entry|null getEntry (int $tag)


getLength

Returns the length of the specified entry in this table directory

Parameters:
  • int $tag

    Tag identifier of the entry to be retrieved

Returns:
int -- Length of the retrieved entry, or -1 if not found
Used by:
Sgss_Font_Truetype_Parser::getTableLength()
Signature:
public int getLength (int $tag)


getName

Returns the name of the specified entry in this table directory

Parameters:
  • int $tag

    Tag identifier of the entry to be retrieved

Returns:
string|null -- Name of the retrieved entry, or null if not found
Signature:
public string|null getName (int $tag)


getOffset

Returns the offset to the specified entry in this table directory

Parameters:
  • int $tag

    Tag identifier of the entry to be retrieved

Returns:
int -- Offset to the retrieved entry, or -1 if not found
Used by:
Sgss_Font_Truetype_Parser::getTableOffset()
Signature:
public int getOffset (int $tag)


offsetExists

Parameters:
  • mixed $offset
Specified by:
  • ArrayAccess::offsetExists
Related subject:
ArrayAccess::offsetExists()
Signature:
public boolean offsetExists (mixed $offset)


offsetGet

Parameters:
  • mixed $offset
Specified by:
  • ArrayAccess::offsetGet
Related subject:
ArrayAccess::offsetGet()
Signature:
public mixed offsetGet (mixed $offset)


offsetSet

Parameters:
  • mixed $offset
  • mixed $value
Specified by:
  • ArrayAccess::offsetSet
Related subject:
ArrayAccess::offsetSet()
Signature:
public mixed offsetSet (mixed $offset, mixed $value)


offsetUnset

Parameters:
  • mixed $offset
Specified by:
  • ArrayAccess::offsetUnset
Related subject:
ArrayAccess::offsetUnset()
Signature:
public void offsetUnset (mixed $offset)