Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkGlyphSets error using SIL's "Schehezade" font #1408

Closed
JasonPamir opened this issue Apr 10, 2021 · 2 comments
Closed

MarkGlyphSets error using SIL's "Schehezade" font #1408

JasonPamir opened this issue Apr 10, 2021 · 2 comments

Comments

@JasonPamir
Copy link

MarkGlyphSets error when using SIL Schehezade font

Uncaught Mpdf\Exception\FontException: This font scheherazade contains MarkGlyphSets - Not tested yet in .../vendor/mpdf/mpdf/src/TTFontFile.php:2963

Code to reproduce (using either the font Schehezade or Schehezade New, from SIL):

        <?php 
        require_once 'lib/vendor/autoload.php';
	// Get existing font data (to which we will append our fonts)
	$defaultFontConfig = (new Mpdf\Config\FontVariables())->getDefaults();
	$fontData = $defaultFontConfig['fontdata'];

	$pdf = new Mpdf\Mpdf([
		'mode' => 'utf-8', 
		'format' => [90,180],
		'fontdata' => $fontData + [
			'scheherazade' => [
				'R' => 'Scheherazade-Regular.ttf',
				'B' => 'Scheherazade-Bold.ttf',
				'useOTL' => 0xFF,
				'useKashida' => 75,
			]
		],
		'default_font' => 'scheherazade'
	]);
        ?>

Other info
"Schehezade" produces the MarkGlyphSets error mentioned above, and "Schehezade New" produces the same error with additional non-fatal notices:

Notice: Undefined offset: in /mpdf/mpdf/src/TTFontFile.php on line 3190.

Attaching fonts: (also available from SIL)
Scheherazade-2.100.zip
ScheherazadeNew-3.100.zip

@fglueck
Copy link
Contributor

fglueck commented Oct 20, 2021

I have the same problem with notosansdis.
The sign with make the problem was the backtick before 25: "Drive ́25"

This font [notosansdis] contains MarkGlyphSets - Not tested yet

U+0341 | ́ | cd 81 | COMBINING ACUTE TONE MARK

@finwe finwe closed this as completed in ba3a9bd Apr 6, 2022
@finwe
Copy link
Member

finwe commented Apr 6, 2022

This does not seem to be as a bug, given the error, fonts with MarkGlyphSets are just not supported. Changed the exception message to be more descriptive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants