SetaPDF_Core_Font_TrueType_File Parser class for TTF/OTF files

File: /SetaPDF/Core/Font/TrueType/File.php

Based on the OpenType specification 1.6: http://www.microsoft.com/typography/otspec/

Class hierarchy

Summary

Properties

$_reader

$_tableRecords

Data of tables in the TTF file


Methods

__construct()

_getUnitsPerEm()

Get the units per em.

_seekTable()

protected void SetaPDF_Core_Font_TrueType_File::_seekTable ( string $tag )

Set the file pointer to the start byte offset position of table.

Parameters
$tag : string
 
Exceptions

Throws SetaPDF_Core_Exception

areCharsCovered()

public boolean SetaPDF_Core_Font_TrueType_File::areCharsCovered ( array $chars )

Checks if characters are covered by this font.

Parameters
$chars : array

The chars in UTF-16BE encoding

cleanUp()

Release resources.

getEntrySelector()

Get the entry selector value.

getNumTables()

Get the number of tables.

getRangeShift()

Get the range shift value.

getReader()

Get the reader instance.

getSearchRange()

Get the search range value.

getSfntVersion()

Get the sfnt version.

getTable()

Get a tag specific table.

Parameters
$tag : string
 

getWidth()

public float|boolean SetaPDF_Core_Font_TrueType_File::getWidth ( string $char )

Get the width of a single character/glyph.

Parameters
$char : string
 

getWidths()

public array SetaPDF_Core_Font_TrueType_File::getWidths ( array $chars )

Get character/glyph width values.

Parameters
$chars : array

The chars in UTF-16BE encoding

isCharCovered()

public boolean SetaPDF_Core_Font_TrueType_File::isCharCovered ( string $char )

Checks if a character is covered by this font.

Parameters
$char : string

The character in UTF-16BE encoding

isEmbeddable()

Checks if a font is embeddable.

tableExists()

public boolean SetaPDF_Core_Font_TrueType_File::tableExists ( string $tag )

Check if a specific table exists.

Parameters
$tag : string