Docs For Class Zend_Pdf_FileParser_Font

## Class Zend_Pdf_FileParser_Font

Description

Abstract helper class for Zend_Pdf_Font that parses font files.

Defines the public interface for concrete subclasses which are responsible for parsing the raw binary data from the font file on disk. Also provides a debug logging interface and a couple of shared utility methods.

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Pdf/FileParser/Font.php (line 40)

    Zend_Pdf_FileParser
       |
       --Zend_Pdf_FileParser_Font

Direct descendents

Class | Description
--- | ---
Zend_Pdf_FileParser_Font_OpenType | Abstract base class for OpenType font file parsers.

Method Summary
Zend_Pdf_FileParser_Font __construct (Zend_Pdf_FileParserDataSource $dataSource)
string readStringMacRoman (integer $byteCount, [string $characterSet = ''])
string readStringPascal ([string $characterSet = ''], [integer $lengthBytes = 1])
string readStringUTF16 (integer $byteCount, [integer $byteOrder = Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN], [string $characterSet = ''])
void writeDebug ()
void _debugLog (string $message, mixed 1)
mixed __get (string $property)
void __set (string $property, mixed $value)
Variables

#### Inherited Variables

Inherited from Zend_Pdf_FileParser

> Zend_Pdf_FileParser::$_dataSource
> Zend_Pdf_FileParser::$_isParsed
> Zend_Pdf_FileParser::$_isScreened

Methods
Constructor __construct (line 73)

Object constructor.

Validates the data source and enables debug logging if so configured.

- access: public
- throws: Zend_Pdf_Exception

Zend_Pdf_FileParser_Font __construct (Zend_Pdf_FileParserDataSource $dataSource)

- Zend_Pdf_FileParserDataSource $dataSource

Redefinition of:

Zend_Pdf_FileParser::__construct()
  Object constructor.

readStringMacRoman (line 140)

Reads the Mac Roman-encoded string from the binary file at the current offset location. Overridden to fix return character set at UTF-16BE.

- access: public
- throws: Zend_Pdf_Exception

string readStringMacRoman (integer $byteCount, [string $characterSet = ''])

- integer $byteCount: Number of bytes (characters) to return.
- string $characterSet: (optional) --Ignored--

Redefinition of:

Zend_Pdf_FileParser::readStringMacRoman()
  Reads the Mac Roman-encoded string from the binary file at the current byte offset.

readStringPascal (line 155)

Reads the Pascal string from the binary file at the current offset location. Overridden to fix return character set at UTF-16BE.

- access: public
- throws: Zend_Pdf_Exception

string readStringPascal ([string $characterSet = ''], [integer $lengthBytes = 1])

- string $characterSet: (optional) --Ignored--
- integer $lengthBytes: (optional) Number of bytes that make up the length. Default is 1.

Redefinition of:

Zend_Pdf_FileParser::readStringPascal()
  Reads the Pascal string from the binary file at the current byte offset.

readStringUTF16 (line 124)

Reads the Unicode UTF-16-encoded string from the binary file at the current offset location. Overridden to fix return character set at UTF-16BE.

- access: public
- throws: Zend_Pdf_Exception
- todo: Deal with to-dos in the parent method.

string readStringUTF16 (integer $byteCount, [integer $byteOrder = Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN], [string $characterSet = ''])

- integer $byteCount: Number of bytes (characters * 2) to return.
- integer $byteOrder: (optional) Big- or little-endian byte order. Use the BYTE_ORDER_ constants defined in Zend_Pdf_FileParser. If omitted, uses big-endian.
- string $characterSet: (optional) --Ignored--

Redefinition of:

Zend_Pdf_FileParser::readStringUTF16()
  Reads the Unicode UTF-16-encoded string from the binary file at the current byte offset.

writeDebug (line 166)

Writes the entire font properties array to STDOUT. Used only for debugging.

- access: public

void writeDebug ()
_debugLog (line 208)

If debug logging is enabled, writes the log message.

The log message is a sprintf() style string and any number of arguments may accompany it as additional parameters.

- access: protected

void _debugLog (string $message, mixed 1)

- string $message
- mixed 1: (optional, multiple) Additional arguments

__get (line 96)

Get handler

- access: public

mixed __get (string $property)

- string $property

__set (line 187)

Set handler

NOTE: This method is protected. Other classes may freely interrogate the font properties, but only this and its subclasses may set them.

- access: protected

void __set (string $property, mixed $value)

- string $property
- mixed $value

#### Inherited Methods

Inherited From Zend_Pdf_FileParser

> Zend_Pdf_FileParser::__construct()
> Zend_Pdf_FileParser::getDataSource()
> Zend_Pdf_FileParser::isBitSet()
> Zend_Pdf_FileParser::isParsed()
> Zend_Pdf_FileParser::isScreened()
> Zend_Pdf_FileParser::moveToOffset()
> Zend_Pdf_FileParser::parse()
> Zend_Pdf_FileParser::readBytes()
> Zend_Pdf_FileParser::readFixed()
> Zend_Pdf_FileParser::readInt()
> Zend_Pdf_FileParser::readStringMacRoman()
> Zend_Pdf_FileParser::readStringPascal()
> Zend_Pdf_FileParser::readStringUTF16()
> Zend_Pdf_FileParser::readUInt()
> Zend_Pdf_FileParser::screen()
> Zend_Pdf_FileParser::skipBytes()
> Zend_Pdf_FileParser::__destruct()

Class Constants

#### Inherited Constants

Inherited from Zend_Pdf_FileParser

> Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN
> Zend_Pdf_FileParser::BYTE_ORDER_LITTLE_ENDIAN

Documentation generated on Sun, 29 Oct 2006 21:27:16 -0600 by phpDocumentor 1.3.0RC6