Lines Matching defs:mpdf

27 	private $mpdf;
111 public function __construct(Mpdf $mpdf, FontCache $fontCache)
113 $this->mpdf = $mpdf;
138 $this->fontkey = $this->mpdf->CurrentFont['fontkey'];
139 $this->glyphIDtoUni = $this->mpdf->CurrentFont['glyphIDtoUni'];
167 $earr = $this->mpdf->UTF8StringToArray($str, false);
278 $ScriptLang = $this->mpdf->CurrentFont['GSUBScriptLang'];
281 if ($this->mpdf->fontLanguageOverride && strpos($ScriptLang[$GSUBscriptTag], $this->mpdf->fontLanguageOverride) !== false) {
282 $GSUBlangsys = str_pad($this->mpdf->fontLanguageOverride, 4);
284 $GSUBlangsys = $this->_getOTLLangTag($this->mpdf->currentLang, $ScriptLang[$GSUBscriptTag]);
287 $ScriptLang = $this->mpdf->CurrentFont['GPOSScriptLang'];
297 if ($GPOSscriptTag && $this->mpdf->fontLanguageOverride && strpos($ScriptLang[$GPOSscriptTag], $this->mpdf->fontLanguageOverride) !== false) {
298 $GPOSlangsys = str_pad($this->mpdf->fontLanguageOverride, 4);
300 $GPOSlangsys = $this->_getOTLLangTag($this->mpdf->currentLang, $ScriptLang[$GPOSscriptTag]);
305 // $mpdf->overrideOTLsettings does not exist, this is never called
306 /*if (isset($this->mpdf->overrideOTLsettings) && isset($this->mpdf->overrideOTLsettings[$this->fontkey])) {
307 $GSUBscriptTag = $GPOSscriptTag = $this->mpdf->overrideOTLsettings[$this->fontkey]['script'];
308 $GSUBlangsys = $GPOSlangsys = $this->mpdf->overrideOTLsettings[$this->fontkey]['lang'];
328 $GSUBFeatures = (isset($this->mpdf->CurrentFont['GSUBFeatures'][$GSUBscriptTag][$GSUBlangsys]) ? $this->mpdf->CurrentFont['GSUBFeatures'][$GSUBscriptTag][$GSUBlangsys] : false);
329 $GPOSFeatures = (isset($this->mpdf->CurrentFont['GPOSFeatures'][$GPOSscriptTag][$GPOSlangsys]) ? $this->mpdf->CurrentFont['GPOSFeatures'][$GPOSscriptTag][$GPOSlangsys] : false);
351 if ($this->mpdf->useDictionaryLBR && ($this->shaper == "K" || $this->shaper == "T" || $this->shaper == "L")) {
355 elseif ($this->mpdf->useTibetanLBR && $scriptblock == Ucdn::SCRIPT_TIBETAN) {
398 $this->GSUBLookups = $this->mpdf->CurrentFont['GSUBLookups'];
410 if (!empty($this->mpdf->OTLtags)) {
423 if (!empty($this->mpdf->OTLtags)) {
521 if (!empty($this->mpdf->OTLtags)) {
618 if ($this->mpdf->_charDefined($this->mpdf->fonts[$this->fontkey]['cw'], 0x25CC)) {
667 if (!empty($this->mpdf->OTLtags)) {
698 if ($this->mpdf->_charDefined($this->mpdf->fonts[$this->fontkey]['cw'], 0x25CC)) {
725 if (!empty($this->mpdf->OTLtags)) {
771 if ($this->mpdf->_charDefined($this->mpdf->fonts[$this->fontkey]['cw'], 0x25CC)) {
805 if (!empty($this->mpdf->OTLtags)) {
969 if (!empty($this->mpdf->OTLtags)) {
973 if (!(($this->mpdf->textvar & TextVars::FC_SMALLCAPS) && $scriptblock == Ucdn::SCRIPT_LATIN && strpos($useGSUBtags, 'smcp') === false)) {
1029 $fontCacheFilename = $this->mpdf->CurrentFont['fontkey'] . '.GPOSdata.json';
1036 $this->GPOSLookups = $this->mpdf->CurrentFont['GPOSLookups'];
1055 if (!empty($this->mpdf->OTLtags)) {
1077 if (!(($this->mpdf->textvar & TextVars::FC_SMALLCAPS) && $scriptblock == Ucdn::SCRIPT_LATIN && strpos($useGSUBtags, 'smcp') === false)) {
1197 if (isset($this->mpdf->CurrentFont['subset'])) {
1198 $this->mpdf->CurrentFont['subset'][$this->schOTLdata[$sch][$i]['uni']] = $this->schOTLdata[$sch][$i]['uni'];
1214 if (empty($this->mpdf->OTLtags['Plus']) && empty($this->mpdf->OTLtags['Minus']) && empty($this->mpdf->OTLtags['FFPlus']) && empty($this->mpdf->OTLtags['FFMinus'])) {
1228 if (isset($this->mpdf->OTLtags['Plus'])) {
1229 $fp = $this->mpdf->OTLtags['Plus'];
1241 if (isset($this->mpdf->OTLtags['Minus'])) {
1242 $fm = $this->mpdf->OTLtags['Minus'];
1254 if (isset($this->mpdf->OTLtags['FFPlus'])) {
1255 $ffp = $this->mpdf->OTLtags['FFPlus']; // Font Features - may include integer: salt4
1267 if (isset($this->mpdf->OTLtags['FFMinus'])) {
1268 $ffm = $this->mpdf->OTLtags['FFMinus'];
1288 $GSUBFeatures = $this->mpdf->CurrentFont['GSUBFeatures'][$scriptTag][$langsys];
1336 $GSUBFeatures = $this->mpdf->CurrentFont['GSUBFeatures'][$scriptTag][$langsys];
1391 $GSUBFeatures = $this->mpdf->CurrentFont['GSUBFeatures'][$scriptTag][$langsys];
1448 $GSUBFeatures = $this->mpdf->CurrentFont['GSUBFeatures'][$scriptTag][$langsys];
3219 $cw = round($this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$basepos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000); // convert back to font design units
3461 $pdfWidth = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], hexdec($currGlyph)); // DON'T convert back to design units
3471 if (round($pdfWidth) == round($x * 1000 / $this->mpdf->CurrentFont['unitsPerEm'])) {
3474 $x = $x - ($pdfWidth * $this->mpdf->CurrentFont['unitsPerEm'] / 1000);
3484 if (round($pdfWidth) == round($x * 1000 / $this->mpdf->CurrentFont['unitsPerEm'])) {
3487 $x = $x - ($pdfWidth * $this->mpdf->CurrentFont['unitsPerEm'] / 1000);
3557 $BaseWidth = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$matchedpos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3562 $BaseWidthExtra = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$i]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3646 $LigatureWidth = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$matchedpos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3651 $LigatureWidthExtra = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$i]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3721 $Mark2Width = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$matchedpos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
4556 * These functions are called from mpdf after GSUB/GPOS has taken place
5755 while (mb_strpos($txt, $char, 0, $this->mpdf->mb_enc) !== false) {
5756 $pos = mb_strpos($txt, $char, 0, $this->mpdf->mb_enc);
5783 while (mb_strpos($txt, $char, 0, $this->mpdf->mb_enc) !== false) {
5784 $pos = mb_strpos($txt, $char, 0, $this->mpdf->mb_enc);
6026 NB If change for RTL - cf. function magic_reverse_dir in mpdf.php to update