Sgss_Font_Parser_Abstract 
Abstract class for parsing font file

Description

Implements:
Sgss_Font_Parser_Interface
Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Font/Parser/Abstract.php (line 66)

Direct descendant

Sgss_Font_Truetype_Parser Parses TrueType font file

Class overview

Variables

protected Sgss_Font_Cache $_cache

Cache file object to be built

protected string $_file

Path to the font file to be parsed

protected int $_level

Level identifier of log output

protected Sgss_File_Reader_Interface $_reader

Reader for the font file stream

protected int $_size

Size of the font file stream in byte

protected Sgss_File_Stream_Read $_stream

Stream of the font file

Methods

void debug (string $message)

Called when this parser logs information for debugging

void error (string $message)

Called when this parser logs error information

Sgss_File_Reader_Interface getBlockReader (int $offset, int $length)

Returns the reader for the specified range of the font file stream

Sgss_Font_Cache getCache ()

Returns the cache file object currently assigned to this parser

string getFile ()

Returns the path to the font file currently assigned to this parser

Sgss_File_Reader_Interface getReader ()

Returns the reader for the font file stream currently assigned to this parser

int getSize ()

Returns the size of the font file stream currently assigned to this parser

string getStream ()

Returns the stream of the font file currently assigned to this parser

void notice (string $message)

Called when this parser logs information for notice

void setOutputLevel (int $level)

Sets the level of log output to the specified identifier

void warning (string $message)

Called when this parser logs information for warning

protected void _init (string|Sgss_File $file, string|Sgss_File $cache, string|Sgss_File $font)

Initializes this parser

Variable detail

$_cache 

Cache file object to be built

Signature:
protected Sgss_Font_Cache $_cache


$_file 

Path to the font file to be parsed

Signature:
protected string $_file


$_level 

Level identifier of log output

Signature:
protected int $_level = Sgss_Font_Parser::OUTPUT_NONE


$_reader 

Reader for the font file stream

Signature:
protected Sgss_File_Reader_Interface $_reader


$_size 

Size of the font file stream in byte

Signature:
protected int $_size


$_stream 

Stream of the font file

Signature:
protected Sgss_File_Stream_Read $_stream


Method detail

debug

Called when this parser logs information for debugging

Parameters:
  • string $message

    Message to be logged

Signature:
public void debug (string $message)


error

Called when this parser logs error information

Parameters:
  • string $message

    Message to be logged

Overridden by:
Signature:
public void error (string $message)


getBlockReader

Returns the reader for the specified range of the font file stream

Parameters:
  • int $offset

    Offset of the range

  • int $length

    Length of the range

Returns:
Sgss_File_Reader_Interface -- Reader for the font file stream
Overridden by:
Uses:
Sgss_File_Reader_String
Signature:
public Sgss_File_Reader_Interface getBlockReader (int $offset, int $length)


getCache

Returns the cache file object currently assigned to this parser

Returns:
Sgss_Font_Cache -- Cache file object currently assigned to this parser
Signature:
public Sgss_Font_Cache getCache ()


getFile

Returns the path to the font file currently assigned to this parser

Returns:
string -- Path to the font file currently assigned to this parser
Signature:
public string getFile ()


getReader

Returns the reader for the font file stream currently assigned to this parser

Returns:
Sgss_File_Reader_Interface -- Reader for the font file stream currently assigned to this parser
Signature:
public Sgss_File_Reader_Interface getReader ()


getSize

Returns the size of the font file stream currently assigned to this parser

Returns:
int -- Size in byte of the font file stream currently assigned to this parser
Signature:
public int getSize ()


getStream

Returns the stream of the font file currently assigned to this parser

Returns:
string -- Stream of the font file currently assigned to this parser
Signature:
public string getStream ()


notice

Called when this parser logs information for notice

Parameters:
  • string $message

    Message to be logged

Signature:
public void notice (string $message)


setOutputLevel

Sets the level of log output to the specified identifier

Parameters:
  • int $level

    Level identifier of output

Signature:
public void setOutputLevel (int $level)


warning

Called when this parser logs information for warning

Parameters:
  • string $message

    Message to be logged

Overridden by:
Signature:
public void warning (string $message)


_init 

Initializes this parser

Parameters:
  • string|Sgss_File $font

    Path to the font file to be parsed

  • string|Sgss_File $cache

    Path to the cache file to be built

  • $file
Uses:
Sgss_File_Stream_Read::getReader(), Sgss_File_Stream_Read
Signature:
protected void _init (string|Sgss_File $file, string|Sgss_File $cache, string|Sgss_File $font)