setasign\SetaPDF2\Core\Font\TrueType\Subset\Table\CharacterToGlyphIndexMapping

ByteEncoding This class represents the format byte encoding (format0) subtable in a sub-setting context.

File: /SetaPDF v2/Core/Font/TrueType/Subset/Table/CharacterToGlyphIndexMapping/ByteEncoding.php
Old class name (alias): \SetaPDF_Core_Font_TrueType_Subset_Table_CharacterToGlyphIndexMapping_ByteEncoding

See https://www.microsoft.com/typography/otspec/cmap.htm#format0 for more details.

Class hierarchy

Implements

Summary

Properties

$_language

protected int SubTable::$_language

The language of the cmap subtable.

$_mapping

protected array SubTable::$_mapping = array()

The mapping.


Methods

__construct()

public SubTable::__construct (
int $language
)

The constructor.

Parameters
$language : int
 

cleanUp()

public SubTable::cleanUp (
void
): void

Release memory and cycled references.

count()

public SubTable::count (
void
): int

Gets the size of the mapping.

getFormat()

public ByteEncoding::getFormat (
void
): int

Returns the sub table format

getLanguage()

public SubTable::getLanguage (
void
): int

Returns the language.

setGlyphIndex()

public ByteEncoding::setGlyphIndex (
int $charCode,
int $index
): void

Add/Change a mapping in the subtable.

Parameters
$charCode : int
 
$index : int
 

write()

Writes the sub table.

Parameters
$writer : \SetaPDF_Core_Writer_WriterInterface