SetaPDF_Core_Font_Cmap Class representing a CMAP.
File: /SetaPDF v2/Core/Font/Cmap.php
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
Properties
$_cidMap
A separate CMAP instance of only CID mappings.
$_name
The name resolved from the CMAP file.
Static Methods
_readValue()
Read the next value via the tokenizer instance.
Parameters
- $tokenizer : SetaPDF_Core_Tokenizer
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
Throws SetaPDF_Core_Font_Exception
createNamed()
bool $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 SetaPDF_Core_Font_Cmap::cleanUpNamedInstanceCache().
Parameters
- $name : string
- $cache : bool
This parameter will write a serialized version into the cmaps folder (only on PHP >= 7).
Exceptions
Throws SetaPDF_Core_Font_Exception
Methods
addCidRangeMapping()
int $src2,
int $dst,
int $size
Add a cid range mapping.
Parameters
- $src1 : int
- $src2 : int
- $dst : int
- $size : int
addRangeMapping()
int $src2,
string $dst,
int $size
Add a range mapping.
Parameters
- $src1 : int
- $src2 : int
- $dst : string
- $size : int