API Documentation

Zend/Pdf/FileParser/Font.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Pdf  
Subpackage
FileParser  
Version
$Id: Font.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Pdf_FileParser_Font

Package: Zend\Pdf\FileParser

Abstract helper class for {@link 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.

Parent(s)
\Zend_Pdf_FileParser
Children
\Zend_Pdf_FileParser_Font_OpenType
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprivateboolean  $_debug= 'false'

Flag indicating whether or not debug logging is active.

Default valuefalseDetails
Type
boolean
Propertyprivatearray  $_fontProperties= 'array()'

Array of parsed font properties. Used with {@link __get()} and {@link __set()}.

Default valuearray()Details
Type
array

Methods

methodpublic__construct( \Zend_Pdf_FileParserDataSource $dataSource ) : void

Object constructor.

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

Parameters
Name Type Description
$dataSource \Zend_Pdf_FileParserDataSource
Throws
Exception Description
\Zend_Pdf_Exception
methodpublic__get( string $property ) : mixed

Get handler

Parameters
Name Type Description
$property string
Returns
Type Description
mixed
methodpublic__set( string $property, mixed $value ) : void

Set handler

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

Parameters
Name Type Description
$property string
$value mixed
methodprotected_debugLog( string $message ) : void

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.

Parameters
Name Type Description
$message string
methodpublicreadStringMacRoman( integer $byteCount, string $characterSet = '' ) : string

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

Parameters
Name Type Description
$byteCount integer

Number of bytes (characters) to return.

$characterSet string

(optional) --Ignored--

Returns
Type Description
string
Throws
Exception Description
\Zend_Pdf_Exception
methodpublicreadStringPascal( string $characterSet = '', integer $lengthBytes = 1 ) : string

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

Parameters
Name Type Description
$characterSet string

(optional) --Ignored--

$lengthBytes integer

(optional) Number of bytes that make up the length. Default is 1.

Returns
Type Description
string
Throws
Exception Description
\Zend_Pdf_Exception
methodpublicreadStringUTF16( integer $byteCount, integer $byteOrder = Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN, string $characterSet = '' ) : string

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.

Parameters
Name Type Description
$byteCount integer

Number of bytes (characters * 2) to return.

$byteOrder integer

(optional) Big- or little-endian byte order. Use the BYTE_ORDER_ constants defined in {@link Zend_Pdf_FileParser}. If omitted, uses big-endian.

$characterSet string

(optional) --Ignored--

Returns
Type Description
string
Throws
Exception Description
\Zend_Pdf_Exception
Details
Todo
Deal with to-dos in the parent method.  
methodpublicwriteDebug( ) : void

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

Documentation was generated by DocBlox 0.15.1.