Lines Matching defs:mpdf
11 private $mpdf;
26 public function __construct(Mpdf $mpdf)
28 $this->mpdf = $mpdf;
57 if (!in_array($this->mpdf->SHYlang, $this->mpdf->SHYlanguages)) {
66 if ($this->mpdf->usingCoreFont) {
67 $word = mb_convert_encoding($word, 'UTF-8', $this->mpdf->mb_enc);
75 if (preg_match('/^(["\'' . $startpunctuation . '])+(.{' . $this->mpdf->SHYcharmin . ',})$/u', $word, $m)) {
80 if (preg_match('/^(.{' . $this->mpdf->SHYcharmin . ',})([\'\.,;:!?"' . $endpunctuation . ']+)$/u', $word, $m)) {
85 if (mb_strlen($word, 'UTF-8') < $this->mpdf->SHYcharmin) {
122 for ($position = 0; $position <= ($word_length - $this->mpdf->SHYcharmin); $position++) {
123 $maxwins = min($word_length - $position, $this->mpdf->SHYcharmax);
124 for ($win = $this->mpdf->SHYcharmin; $win <= $maxwins; $win++) {
144 for ($i = $this->mpdf->SHYleftmin; $i <= (mb_strlen($word, 'UTF-8') - $this->mpdf->SHYrightmin); $i++) {
159 return !(count($this->patterns) < 1 || ($this->loadedPatterns && $this->loadedPatterns !== $this->mpdf->SHYlang));
164 $patterns = require __DIR__ . '/../data/patterns/' . $this->mpdf->SHYlang . '.php';
175 $this->loadedPatterns = $this->mpdf->SHYlang;
180 if (file_exists($this->mpdf->hyphenationDictionaryFile)) {
181 $this->dictionary = file($this->mpdf->hyphenationDictionaryFile, FILE_SKIP_EMPTY_LINES);
201 } elseif ($this->mpdf->debug) {
202 throw new \Mpdf\MpdfException(sprintf('Unable to open hyphenation dictionary "%s"', $this->mpdf->hyphenationDictionaryFile));