SetaPDF_Core_Font_Standard_ZapfDingbats Class representing the PDF standard font ZapfDingbats

File: /SetaPDF v2/Core/Font/Standard/ZapfDingbats.php

Class hierarchy

Implements

Summary

Static Properties

$_fonts

static protected array SetaPDF_Core_Font::$_fonts = array()

An array caching font objects


Properties

$_ascent

The distance from baseline of highest ascender (Typographic ascent)

$_avgWidth

protected integer|float SetaPDF_Core_Font_Simple::$_avgWidth

The average width of glyphs in the font.

$_capHeight

The vertical coordinate of the top of flat capital letters, measured from the baseline.

$_charCodeCache

protected array SetaPDF_Core_Font::$_charCodeCache = array()

A char code cache which is used in SetaPDF_Core_Font::getCharByCharCode().

$_descent

The distance from baseline of lowest descender (Typographic descent)

$_dictionary

$_encodingTable

The encoding table

$_fontBBox

protected array SetaPDF_Core_Font_Standard::$_fontBBox = array()

The font bounding box

$_fontFamily

The font family

$_fontName

The font name

$_indirectObject

The indirect object of the font

$_info

protected array SetaPDF_Core_Font::$_info = array()

Array holding information about the font

$_isBold

protected boolean SetaPDF_Core_Font_Standard::$_isBold = false

Flag indicating if this font is bold.

$_isItalic

protected boolean SetaPDF_Core_Font_Standard::$_isItalic = false

Flag indicating if this font is italic.

$_isMonospace

protected boolean SetaPDF_Core_Font_Standard::$_isMonospace = false

Flag indicating if this font is monospace.

$_italicAngle

The italic angle

$_kerningPairs

protected array SetaPDF_Core_Font_Standard::$_kerningPairs = array()

Kerning pairs

$_substituteCharacter

The UTF-16BE unicode value for a substitute character

$_toUnicodeTable

The map that maps character codes to uncidoe values

$_widths

protected array SetaPDF_Core_Font_Standard::$_widths = array()

Glyph widths

$_widthsByCharCode

Widths by char codes

$_xHeight

The vertical coordinate of the top of flat non-ascending lowercase letters (like the letter x), measured from the baseline


Static Methods

_createDifferenceArray()

protected static SetaPDF_Core_Font_Standard::_createDifferenceArray (
SetaPDF_Core_Type_Dictionary $dictionary, string $baseEncoding, array $diffEncoding
): void

Creates a difference array.

Parameters
$dictionary : SetaPDF_Core_Type_Dictionary
 
$baseEncoding : string
 
$diffEncoding : array
 

create()

public static SetaPDF_Core_Font_Standard_ZapfDingbats::create (
SetaPDF_Core_Document $document [, string $baseEncoding = null [, array $diffEncoding = array ( ) ]]
): SetaPDF_Core_Font_Standard_ZapfDingbats

Creates a font object of this font.

Parameters
$document : SetaPDF_Core_Document
 
$baseEncoding : string
 
$diffEncoding : array
 

freeCache()

public static SetaPDF_Core_Font::freeCache (): void

Release font instances by a document instance.

Parameters
$document : SetaPDF_Core_Document
 

freeFontCache()

public static SetaPDF_Core_Font::freeFontCache (): void

Release font instances by a document instance.

Parameters
$document : SetaPDF_Core_Document
 
See

get()

Get a font object by an indirect reference.

The needed font object class is automatically resolve via the Subtype value of the font dictionary.

Parameters
$indirectObjectOrDictionary : SetaPDF_Core_Type_IndirectObjectInterface
 
Exceptions

Throws SetaPDF_Exception_NotImplemented

Throws SetaPDF_Core_Font_Exception

Throws SetaPDF_Core_Type_IndirectReference_Exception

getDefaultDictionary()

Gets a default dictionary for this font.

getStandardFontsToClasses()

Helper method to get all available standard font names and their class mapping.


Methods

_getCharCodesTable()

Get the map that maps character codes to unicode values.

Exceptions

Throws SetaPDF_Core_Font_Exception

_getEncodingTable()

protected SetaPDF_Core_Font_Simple::_getEncodingTable (
void
): array

Get the encoding table based on the Encoding dictionary and it's Differences entry (if available).

_getWidths()

protected SetaPDF_Core_Font_Standard::_getWidths (
void
): void

Resolves the width values from the font descriptor and fills the $_width-array.

_sortByArray()

protected SetaPDF_Core_Font_Simple::_sortByArray (
$array
): array

Sorts an array by shifting the array values to the top of the resulting array.

Parameters
$array
 

getAscent()

public SetaPDF_Core_Font_Standard::getAscent (
void
): float

Returns the distance from baseline of highest ascender (Typographic ascent).

getAvgWidth()

public SetaPDF_Core_Font_Simple::getAvgWidth (
[ boolean $calculateIfUndefined = false ]
): integer|float

Get the average glyph width.

Parameters
$calculateIfUndefined : boolean
 

getBaseEncodingTable()

Get the base encoding table.

getCapHeight()

Get the vertical coordinate of the top of flat capital letters, measured from the baseline.

getCharByCharCode()

public SetaPDF_Core_Font::getCharByCharCode (
string $charCode [, string $encoding = 'UTF-8' ]
): string

Converts a char code from the font specific encoding to another encoding.

Parameters
$charCode : string

The char code in the font specific encoding.

$encoding : string

The resulting encoding

getCharCode()

public SetaPDF_Core_Font::getCharCode (
string $char [, string $encoding = 'UTF-16BE' ]
): string

Get the final character code of a single character.

Parameters
$char : string

The character

$encoding : string

The output encoding

getCharCodes()

public SetaPDF_Core_Font::getCharCodes (
string $chars [, string $encoding = 'UTF-16BE' ]
): array

Get the final character codes of a character string.

Parameters
$chars : string

The character string

$encoding : string

The output encoding

getCharsByCharCodes()

public SetaPDF_Core_Font::getCharsByCharCodes (
string $charCodes [, string $encoding = 'UTF-8' [, bool $asArray = true ]]
): string|array

Converts char codes from the font specific encoding to another encoding.

Parameters
$charCodes : string

The char codes in the font specific encoding.

$encoding : string

The resulting encoding

$asArray : bool
 

getDescent()

public SetaPDF_Core_Font_Standard::getDescent (
void
): float

Returns the distance from baseline of lowest descender (Typographic descent).

getDictionary()

Get the font dictionary.

getFontBBox()

public SetaPDF_Core_Font_Standard::getFontBBox (
void
): array

Returns the font bounding box.

getFontFamily()

public SetaPDF_Core_Font_Standard::getFontFamily (
void
): string

Get the font family.

getFontName()

public SetaPDF_Core_Font_Standard::getFontName (
void
): string

Get the font name.

getGlyphWidth()

public SetaPDF_Core_Font::getGlyphWidth (
string $char [, string $encoding = 'UTF-16BE' ]
): float|int

Get the width of a glyph/character.

Parameters
$char : string

The character

$encoding : string

The input encoding

getGlyphWidthByCharCode()

public SetaPDF_Core_Font_Standard::getGlyphWidthByCharCode (
string $charCode
): float|int

Get the width of a glpyh by its char code.

Parameters
$charCode : string
 

getGlyphsWidth()

public SetaPDF_Core_Font::getGlyphsWidth (
string $chars [, string $encoding = 'UTF-16BE' ]
): float|int

Get the width of the glyphs/characters.

Parameters
$chars : string

The characters

$encoding : string

The input encoding

getIndirectObject()

getInfo()

public SetaPDF_Core_Font::getInfo (
string $name
): bool|string

Get information about the font.

Parameters
$name : string

The name of the font

getItalicAngle()

Returns the italic angle.

getMaxWidth()

public SetaPDF_Core_Font::getMaxWidth (
void
): integer|float

Get the max. glyph width.

getMissingWidth()

public SetaPDF_Core_Font::getMissingWidth (
void
): integer|float

Get the missing glyph width.

getResourceType()

public SetaPDF_Core_Font::getResourceType (
void
): string

Get the resource type.

See

getType()

public SetaPDF_Core_Font::getType (
void
): mixed

Get the Subtype entry of the font dictionary.

getXHeight()

public SetaPDF_Core_Font_Standard::getXHeight (
void
): float

Get the vertical coordinate of the top of flat non-ascending lowercase letters (like the letter x), measured from the baseline.

isBold()

public SetaPDF_Core_Font_Standard::isBold (
void
): boolean

Checks if the font is bold.

isItalic()

public SetaPDF_Core_Font_Standard::isItalic (
void
): boolean

Checks if the font is italic.

isMonospace()

public SetaPDF_Core_Font_Standard::isMonospace (
void
): boolean

Checks if the font is monospace.

splitCharCodes()

public SetaPDF_Core_Font::splitCharCodes (
string $charCodes
): array

Split a string of char codes into single char codes.

Parameters
$charCodes : string