Otl
in package
uses
Strict
Table of Contents
Constants
- _DICT_FINAL_MATCH = 0x4
- _DICT_INTERMEDIATE_MATCH = 0x3
- _DICT_NODE_TYPE_LINEAR = 0x2
- _DICT_NODE_TYPE_SPLIT = 0x1
- _OTL_OLD_SPEC_COMPAT_1 = true
Properties
- $_pos : mixed
- $arabGlyphs : mixed
- $arabLeftJoining : mixed
- $arabRightJoining : mixed
- $arabTransparent : mixed
- $arabTransparentJoin : mixed
- $assocLigs : mixed
- $assocMarks : mixed
- $current_fh : mixed
- $debugOTL : mixed
- $Entry : mixed
- $Exit : mixed
- $fontkey : mixed
- $GDEFdata : mixed
- $GlyphClassBases : mixed
- $GlyphClassComponents : mixed
- $GlyphClassLigatures : mixed
- $GlyphClassMarks : mixed
- $glyphIDtoUni : mixed
- $GPOS_offset : mixed
- $GPOSdata : mixed
- $GPOSLookups : mixed
- $GSLuCoverage : mixed
- $GSUB_length : mixed
- $GSUB_offset : mixed
- $GSUBdata : mixed
- $GSUBfont : mixed
- $GSUBLookups : mixed
- $Ignores : mixed
- $lastBidiStrongType : mixed
- $lbdicts : mixed
- $LuCoverage : mixed
- $LuDataCache : mixed
- $MarkAttachmentType : mixed
- $MarkGlyphSets : mixed
- $OTLdata : mixed
- $restrictToSyllable : mixed
- $schOTLdata : mixed
- $shaper : mixed
- $ttfOTLdata : mixed
- $fontCache : mixed
- $mpdf : mixed
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __get() : mixed
- __isset() : mixed
- __set() : mixed
- __unset() : mixed
- _applyGSUBrules() : mixed
- _applyGSUBrulesIndic() : mixed
- _applyGSUBrulesMyanmar() : mixed
- _applyGSUBrulesSingly() : mixed
- _applyGSUBsubtable() : mixed
- _applyGSUBsubtableSpecial() : mixed
- _applyTagSettings() : mixed
- _updateLigatureMarks() : mixed
- applyOTL() : mixed
- bidiPrepare() : mixed
- The following versions for BidiSort work on amalgamated chunks to process the whole paragraph
- bidiReorder() : mixed
- Reorder, once divided into lines
- bidiSort() : mixed
- Bidi algorithm
- GSUBsubstitute() : mixed
- removeChar() : mixed
- Remove one or more occurrences of $char (single character) from $txt and adjust OTLdata
- replaceSpace() : mixed
- Remove one or more occurrences of $char (single character) from $txt and adjust OTLdata
- sliceOTLdata() : mixed
- splitOTLdata() : mixed
- trimOTLdata() : mixed
- _applyGPOSrules() : mixed
- _applyGPOSsubtable() : mixed
- _applyGPOSvaluerecord() : mixed
- _checkGCOMignore() : mixed
- _dumpproc() : mixed
- _getAnchorTable() : mixed
- _getClassDefinitionTable() : mixed
- _getClasses() : mixed
- _getCoverage() : mixed
- _getCoverageGID() : mixed
- _getGCOMignoreString() : mixed
- _getMarkRecord() : mixed
- _getOTLLangTag() : mixed
- _getOTLscriptTag() : mixed
- _getValueRecord() : mixed
- _getXAdvancePos() : mixed
- arabic_initialise() : mixed
- arabic_shaper() : mixed
- checkContextMatch() : mixed
- checkContextMatchMultiple() : mixed
- checkContextMatchMultipleUni() : mixed
- checkwordmatch() : mixed
- count_bits() : mixed
- get_arab_glyphs() : mixed
- glyphToChar() : mixed
- read_short() : mixed
- read_ushort() : mixed
- seaLineBreaking() : mixed
- South East Asian Linebreaking (Thai, Khmer and Lao) using dictionary of words
- seek() : mixed
- skip() : mixed
- tibetanLineBreaking() : mixed
- unicode_hex() : mixed
Constants
_DICT_FINAL_MATCH
public
mixed
_DICT_FINAL_MATCH
= 0x4
_DICT_INTERMEDIATE_MATCH
public
mixed
_DICT_INTERMEDIATE_MATCH
= 0x3
_DICT_NODE_TYPE_LINEAR
public
mixed
_DICT_NODE_TYPE_LINEAR
= 0x2
_DICT_NODE_TYPE_SPLIT
public
mixed
_DICT_NODE_TYPE_SPLIT
= 0x1
_OTL_OLD_SPEC_COMPAT_1
public
mixed
_OTL_OLD_SPEC_COMPAT_1
= true
Properties
$_pos
public
mixed
$_pos
$arabGlyphs
public
mixed
$arabGlyphs
$arabLeftJoining
public
mixed
$arabLeftJoining
$arabRightJoining
public
mixed
$arabRightJoining
$arabTransparent
public
mixed
$arabTransparent
$arabTransparentJoin
public
mixed
$arabTransparentJoin
$assocLigs
public
mixed
$assocLigs
$assocMarks
public
mixed
$assocMarks
$current_fh
public
mixed
$current_fh
$debugOTL
public
mixed
$debugOTL
= false
$Entry
public
mixed
$Entry
$Exit
public
mixed
$Exit
$fontkey
public
mixed
$fontkey
$GDEFdata
public
mixed
$GDEFdata
$GlyphClassBases
public
mixed
$GlyphClassBases
$GlyphClassComponents
public
mixed
$GlyphClassComponents
$GlyphClassLigatures
public
mixed
$GlyphClassLigatures
$GlyphClassMarks
public
mixed
$GlyphClassMarks
$glyphIDtoUni
public
mixed
$glyphIDtoUni
$GPOS_offset
public
mixed
$GPOS_offset
$GPOSdata
public
mixed
$GPOSdata
$GPOSLookups
public
mixed
$GPOSLookups
$GSLuCoverage
public
mixed
$GSLuCoverage
$GSUB_length
public
mixed
$GSUB_length
$GSUB_offset
public
mixed
$GSUB_offset
$GSUBdata
public
mixed
$GSUBdata
$GSUBfont
public
mixed
$GSUBfont
$GSUBLookups
public
mixed
$GSUBLookups
$Ignores
public
mixed
$Ignores
$lastBidiStrongType
public
mixed
$lastBidiStrongType
$lbdicts
public
mixed
$lbdicts
$LuCoverage
public
mixed
$LuCoverage
$LuDataCache
public
mixed
$LuDataCache
$MarkAttachmentType
public
mixed
$MarkAttachmentType
$MarkGlyphSets
public
mixed
$MarkGlyphSets
$OTLdata
public
mixed
$OTLdata
$restrictToSyllable
public
mixed
$restrictToSyllable
$schOTLdata
public
mixed
$schOTLdata
$shaper
public
mixed
$shaper
$ttfOTLdata
public
mixed
$ttfOTLdata
$fontCache
private
mixed
$fontCache
$mpdf
private
mixed
$mpdf
Methods
__call()
public
__call(string $name, array<string|int, mixed> $args) : mixed
Parameters
- $name : string
-
method name
- $args : array<string|int, mixed>
-
arguments
__callStatic()
public
static __callStatic(string $name, array<string|int, mixed> $args) : mixed
Parameters
- $name : string
-
lowercase method name
- $args : array<string|int, mixed>
-
arguments
__construct()
public
__construct(Mpdf $mpdf, FontCache $fontCache) : mixed
Parameters
__get()
public
& __get(string $name) : mixed
Parameters
- $name : string
-
property name
__isset()
public
__isset(string $name) : mixed
Parameters
- $name : string
-
property name
Tags
__set()
public
__set(string $name, mixed $value) : mixed
Parameters
- $name : string
-
property name
- $value : mixed
-
property value
__unset()
public
__unset(string $name) : mixed
Parameters
- $name : string
-
property name
Tags
_applyGSUBrules()
public
_applyGSUBrules(mixed $usetags, mixed $scriptTag, mixed $langsys) : mixed
Parameters
- $usetags : mixed
- $scriptTag : mixed
- $langsys : mixed
_applyGSUBrulesIndic()
public
_applyGSUBrulesIndic(mixed $usetags, mixed $scriptTag, mixed $langsys, mixed $is_old_spec) : mixed
Parameters
- $usetags : mixed
- $scriptTag : mixed
- $langsys : mixed
- $is_old_spec : mixed
_applyGSUBrulesMyanmar()
public
_applyGSUBrulesMyanmar(mixed $usetags, mixed $scriptTag, mixed $langsys) : mixed
Parameters
- $usetags : mixed
- $scriptTag : mixed
- $langsys : mixed
_applyGSUBrulesSingly()
public
_applyGSUBrulesSingly(mixed $usetags, mixed $scriptTag, mixed $langsys) : mixed
Parameters
- $usetags : mixed
- $scriptTag : mixed
- $langsys : mixed
_applyGSUBsubtable()
public
_applyGSUBsubtable(mixed $lookupID, mixed $subtable, mixed $ptr, mixed $currGlyph, mixed $currGID, mixed $subtable_offset, mixed $Type, mixed $Flag, mixed $MarkFilteringSet, mixed $LuCoverage, mixed $level, mixed $currentTag, mixed $is_old_spec, mixed $tagInt) : mixed
Parameters
- $lookupID : mixed
- $subtable : mixed
- $ptr : mixed
- $currGlyph : mixed
- $currGID : mixed
- $subtable_offset : mixed
- $Type : mixed
- $Flag : mixed
- $MarkFilteringSet : mixed
- $LuCoverage : mixed
- $level : mixed
- $currentTag : mixed
- $is_old_spec : mixed
- $tagInt : mixed
_applyGSUBsubtableSpecial()
public
_applyGSUBsubtableSpecial(mixed $lookupID, mixed $subtable, mixed $ptr, mixed $currGlyph, mixed $currGID, mixed $nextGlyph, mixed $nextGID, mixed $subtable_offset, mixed $Type, mixed $LuCoverage) : mixed
Parameters
- $lookupID : mixed
- $subtable : mixed
- $ptr : mixed
- $currGlyph : mixed
- $currGID : mixed
- $nextGlyph : mixed
- $nextGID : mixed
- $subtable_offset : mixed
- $Type : mixed
- $LuCoverage : mixed
_applyTagSettings()
public
_applyTagSettings(mixed $tags, mixed $Features[, mixed $omittags = '' ][, mixed $onlytags = false ]) : mixed
Parameters
- $tags : mixed
- $Features : mixed
- $omittags : mixed = ''
- $onlytags : mixed = false
_updateLigatureMarks()
public
_updateLigatureMarks(mixed $pos, mixed $n) : mixed
Parameters
- $pos : mixed
- $n : mixed
applyOTL()
public
applyOTL(mixed $str, mixed $useOTL) : mixed
Parameters
- $str : mixed
- $useOTL : mixed
bidiPrepare()
The following versions for BidiSort work on amalgamated chunks to process the whole paragraph
public
bidiPrepare(mixed &$para, mixed $dir) : mixed
Firstly set the level in the OTLdata - called from fn printbuffer() [_bidiPrepare] Secondly re-order - called from fn writeFlowingBlock and FinishFlowingBlock, when already divided into lines. [_bidiReorder]
Parameters
- $para : mixed
- $dir : mixed
bidiReorder()
Reorder, once divided into lines
public
bidiReorder(mixed &$chunkorder, mixed &$content, mixed &$cOTLdata, mixed $blockdir) : mixed
Parameters
- $chunkorder : mixed
- $content : mixed
- $cOTLdata : mixed
- $blockdir : mixed
bidiSort()
Bidi algorithm
public
bidiSort(mixed $ta, mixed $str, mixed $dir, mixed &$chunkOTLdata, mixed $useGPOS) : mixed
These functions are called from mpdf after GSUB/GPOS has taken place At this stage the bidi-type is in string form
Bidirectional Character Types
Type Description General Scope Strong L Left-to-Right LRM, most alphabetic, syllabic, Han ideographs, non-European or non-Arabic digits, ... LRE Left-to-Right Embedding LRE LRO Left-to-Right Override LRO R Right-to-Left RLM, Hebrew alphabet, and related punctuation AL Right-to-Left Arabic Arabic, Thaana, and Syriac alphabets, most punctuation specific to those scripts, ... RLE Right-to-Left Embedding RLE RLO Right-to-Left Override RLO Weak PDF Pop Directional Format PDF EN European Number European digits, Eastern Arabic-Indic digits, ... ES European Number Separator Plus sign, minus sign ET European Number Terminator Degree sign, currency symbols, ... AN Arabic Number Arabic-Indic digits, Arabic decimal and thousands separators, ... CS Common Number Separator Colon, comma, full stop (period), No-break space, ... NSM Nonspacing Mark Characters marked Mn (Nonspacing_Mark) and Me (Enclosing_Mark) in the Unicode Character Database BN Boundary Neutral Default ignorables, non-characters, and control characters, other than those explicitly given other types. Neutral B Paragraph Separator Paragraph separator, appropriate Newline Functions, higher-level protocol paragraph determination S Segment Separator Tab WS Whitespace Space, figure space, line separator, form feed, General Punctuation spaces, ... ON Other Neutrals All other characters, including OBJECT REPLACEMENT CHARACTER
Parameters
- $ta : mixed
- $str : mixed
- $dir : mixed
- $chunkOTLdata : mixed
- $useGPOS : mixed
GSUBsubstitute()
public
GSUBsubstitute(mixed $pos, mixed $substitute, mixed $Type[, mixed $GlyphPos = null ]) : mixed
Parameters
- $pos : mixed
- $substitute : mixed
- $Type : mixed
- $GlyphPos : mixed = null
removeChar()
Remove one or more occurrences of $char (single character) from $txt and adjust OTLdata
public
removeChar(mixed &$txt, mixed &$cOTLdata, mixed $char) : mixed
Parameters
- $txt : mixed
- $cOTLdata : mixed
- $char : mixed
replaceSpace()
Remove one or more occurrences of $char (single character) from $txt and adjust OTLdata
public
replaceSpace(mixed &$txt, mixed &$cOTLdata) : mixed
Parameters
- $txt : mixed
- $cOTLdata : mixed
sliceOTLdata()
public
sliceOTLdata(mixed $OTLdata, mixed $pos, mixed $len) : mixed
Parameters
- $OTLdata : mixed
- $pos : mixed
- $len : mixed
splitOTLdata()
public
splitOTLdata(mixed &$cOTLdata, mixed $OTLcutoffpos[, mixed $OTLrestartpos = '' ]) : mixed
Parameters
- $cOTLdata : mixed
- $OTLcutoffpos : mixed
- $OTLrestartpos : mixed = ''
trimOTLdata()
public
trimOTLdata(mixed &$cOTLdata[, mixed $Left = true ][, mixed $Right = true ]) : mixed
Parameters
- $cOTLdata : mixed
- $Left : mixed = true
- $Right : mixed = true
_applyGPOSrules()
private
_applyGPOSrules(mixed $LookupList[, mixed $is_old_spec = false ]) : mixed
Parameters
- $LookupList : mixed
- $is_old_spec : mixed = false
_applyGPOSsubtable()
private
_applyGPOSsubtable(mixed $lookupID, mixed $subtable, mixed $ptr, mixed $currGlyph, mixed $currGID, mixed $subtable_offset, mixed $Type, mixed $Flag, mixed $MarkFilteringSet, mixed $LuCoverage, mixed $tag, mixed $level, mixed $is_old_spec) : mixed
Parameters
- $lookupID : mixed
- $subtable : mixed
- $ptr : mixed
- $currGlyph : mixed
- $currGID : mixed
- $subtable_offset : mixed
- $Type : mixed
- $Flag : mixed
- $MarkFilteringSet : mixed
- $LuCoverage : mixed
- $tag : mixed
- $level : mixed
- $is_old_spec : mixed
_applyGPOSvaluerecord()
private
_applyGPOSvaluerecord(mixed $basepos, mixed $Value) : mixed
Parameters
- $basepos : mixed
- $Value : mixed
_checkGCOMignore()
private
_checkGCOMignore(mixed $flag, mixed $glyph, mixed $MarkFilteringSet) : mixed
Parameters
- $flag : mixed
- $glyph : mixed
- $MarkFilteringSet : mixed
_dumpproc()
private
_dumpproc(mixed $GPOSSUB, mixed $lookupID, mixed $subtable, mixed $Type, mixed $Format, mixed $ptr, mixed $currGlyph, mixed $level) : mixed
Parameters
- $GPOSSUB : mixed
- $lookupID : mixed
- $subtable : mixed
- $Type : mixed
- $Format : mixed
- $ptr : mixed
- $currGlyph : mixed
- $level : mixed
_getAnchorTable()
private
_getAnchorTable([mixed $offset = 0 ]) : mixed
Parameters
- $offset : mixed = 0
_getClassDefinitionTable()
private
_getClassDefinitionTable(mixed $offset) : mixed
Parameters
- $offset : mixed
_getClasses()
private
_getClasses(mixed $offset) : mixed
Parameters
- $offset : mixed
_getCoverage()
private
_getCoverage() : mixed
_getCoverageGID()
private
_getCoverageGID() : mixed
_getGCOMignoreString()
private
_getGCOMignoreString(mixed $flag, mixed $MarkFilteringSet) : mixed
Parameters
- $flag : mixed
- $MarkFilteringSet : mixed
_getMarkRecord()
private
_getMarkRecord(mixed $offset, mixed $MarkPos) : mixed
Parameters
- $offset : mixed
- $MarkPos : mixed
_getOTLLangTag()
private
_getOTLLangTag(mixed $ietf, mixed $available) : mixed
Parameters
- $ietf : mixed
- $available : mixed
_getOTLscriptTag()
private
_getOTLscriptTag(mixed $ScriptLang, mixed $scripttag, mixed $scriptblock, mixed $shaper, mixed $useOTL, mixed $mode) : mixed
Parameters
- $ScriptLang : mixed
- $scripttag : mixed
- $scriptblock : mixed
- $shaper : mixed
- $useOTL : mixed
- $mode : mixed
_getValueRecord()
private
_getValueRecord(mixed $ValueFormat) : mixed
Parameters
- $ValueFormat : mixed
_getXAdvancePos()
private
_getXAdvancePos(mixed $pos) : mixed
Parameters
- $pos : mixed
arabic_initialise()
private
arabic_initialise() : mixed
arabic_shaper()
private
arabic_shaper(mixed $usetags, mixed $scriptTag) : mixed
Parameters
- $usetags : mixed
- $scriptTag : mixed
checkContextMatch()
private
checkContextMatch(mixed $Input, mixed $Backtrack, mixed $Lookahead, mixed $ignore, mixed $ptr) : mixed
Parameters
- $Input : mixed
- $Backtrack : mixed
- $Lookahead : mixed
- $ignore : mixed
- $ptr : mixed
checkContextMatchMultiple()
private
checkContextMatchMultiple(mixed $Input, mixed $Backtrack, mixed $Lookahead, mixed $ignore, mixed $ptr[, mixed $class0excl = '' ][, mixed $bclass0excl = '' ][, mixed $lclass0excl = '' ]) : mixed
Parameters
- $Input : mixed
- $Backtrack : mixed
- $Lookahead : mixed
- $ignore : mixed
- $ptr : mixed
- $class0excl : mixed = ''
- $bclass0excl : mixed = ''
- $lclass0excl : mixed = ''
checkContextMatchMultipleUni()
private
checkContextMatchMultipleUni(mixed $Input, mixed $Backtrack, mixed $Lookahead, mixed $ignore, mixed $ptr[, mixed $class0excl = [] ][, mixed $bclass0excl = [] ][, mixed $lclass0excl = [] ]) : mixed
Parameters
- $Input : mixed
- $Backtrack : mixed
- $Lookahead : mixed
- $ignore : mixed
- $ptr : mixed
- $class0excl : mixed = []
- $bclass0excl : mixed = []
- $lclass0excl : mixed = []
checkwordmatch()
private
checkwordmatch(mixed &$dict, mixed $ptr) : mixed
Parameters
- $dict : mixed
- $ptr : mixed
count_bits()
private
count_bits(mixed $n) : mixed
Parameters
- $n : mixed
get_arab_glyphs()
private
get_arab_glyphs(mixed $char, mixed $type, mixed &$chars, mixed $i, mixed $scriptTag, mixed $usetags) : mixed
Parameters
- $char : mixed
- $type : mixed
- $chars : mixed
- $i : mixed
- $scriptTag : mixed
- $usetags : mixed
glyphToChar()
private
glyphToChar(mixed $gid) : mixed
Parameters
- $gid : mixed
read_short()
private
read_short() : mixed
read_ushort()
private
read_ushort() : mixed
seaLineBreaking()
South East Asian Linebreaking (Thai, Khmer and Lao) using dictionary of words
private
seaLineBreaking() : mixed
Sets $this->OTLdata[$i]['wordend']=true at possible end of word boundaries
seek()
private
seek(mixed $pos) : mixed
Parameters
- $pos : mixed
skip()
private
skip(mixed $delta) : mixed
Parameters
- $delta : mixed
tibetanLineBreaking()
private
tibetanLineBreaking() : mixed
unicode_hex()
private
unicode_hex(mixed $unicode_dec) : mixed
Parameters
- $unicode_dec : mixed