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|null
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()
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
_reverseLookup()
Do a reverse lookup by a specific type.
Parameters
- $dest : string
- $type : string
addCidRangeMapping()
Add a cid range mapping.
Parameters
- $src1 : integer
- $src2 : integer
- $dst : integer
- $size : integer
addRangeMapping()
Add a range mapping.
Parameters
- $src1 : integer
- $src2 : integer
- $dst : string
- $size : integer