setasign\SetaPDF2\Core\Font\Cmap
Cmap Class representing a CMAP.
File: /SetaPDF v2/Core/Font/Cmap/Cmap.php
Old class name (alias):
\SetaPDF_Core_Font_Cmap
This class includes a very simple parser for CID data. The extracted data are limited to unicode and cid mappings.
Class hierarchy
Implements
Summary
Static Properties
$cmapDirectory
static public Cmap::$cmapDirectory = '/app/library/SetaPDF/Core/Font/Cmap/_cmaps'
Properties
$_cidMap
protected \SetaPDF_Core_Font_Cmap Cmap::$_cidMap
A separate CMAP instance of only CID mappings.
Static Methods
_readValue()
cleanUpNamedInstanceCache()
Remove named cmap instances from the local cache.
Parameters
- $name : ?string
The name or null for all cached instances
create()
Create an instance based on CMAP data through an reader instance.
Parameters
- $reader : \SetaPDF_Core_Reader_ReaderInterface
Exceptions
createNamed()
public static Cmap::createNamed (
string $name,
bool $cache = false
): mixed|null|\SetaPDF_Core_Font_Cmapbool $cache = false
Creates an instance of an existing CMAP.
Existing CMAPs can be found in /SetaPDF/Font/Cmap/_cmaps/. A named instance will be cached. To remove it from memory you will need to call Cmap::cleanUpNamedInstanceCache().
Parameters
- $name : string
- $cache : bool
This parameter will write a serialized version into the cmaps folder.
Exceptions
Methods
addCidRangeMapping()
Add a cid range mapping.
Parameters
- $src1 : int
- $src2 : int
- $dst : int
- $size : int