setasign\SetaPDF2\Core\Font

ToUnicode Helper class to create ToUnicode Mapping Files

File: /SetaPDF v2/Core/Font/ToUnicode.php
Old class name (alias): \SetaPDF_Core_Font_ToUnicode

See 5099.CMapRessources.pdf and 5411.ToUnicode.pdf

Class hierarchy

Summary

Properties

$_mapping

private array ToUnicode::$_mapping

The given mapping.

$_singleByteMapping

Whenever we create a single byte mapping or a multi(2) byte mapping.


Methods

__construct()

public ToUnicode::__construct (
array $mapping
)

The ToUnicode constructor.

Parameters
$mapping : array
 
Exceptions

Throws \InvalidArgumentException

_optimize()

private ToUnicode::_optimize (
void
): array

Optimizes the mapping data, to make it writable.

create()

public ToUnicode::create (
void
): string

Creates the mapping steam using the given mapping data.