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

Add enc Parameter to addTTFFont #156

Closed
aadlung opened this issue May 22, 2020 · 2 comments
Closed

Add enc Parameter to addTTFFont #156

aadlung opened this issue May 22, 2020 · 2 comments
Assignees

Comments

@aadlung
Copy link

aadlung commented May 22, 2020

Depending on the fonts, using special characters (e.g. in Germany or Hungary) sometimes require to add a font with a utf-8 encoding (not on the document, but on the font), even if the file is of the type "TrueType".

The DocumentViewHelper.php file uses the following syntax:

$fontName = \TCPDF_FONTS::addTTFfont($path, $type, '', 32, $outputPath);

So the encoding of the font file is always empty.

Describe the solution you'd like
I would ask to replace it with the following two lines, to enable adding "utf-8" as setting in typoscript:

$enc = isset($ttfFont['enc']) ? $ttfFont['enc'] : '';
$fontName = \TCPDF_FONTS::addTTFfont($path, $type, '', 32, $outputPath);
@maechler
Copy link
Member

maechler commented May 23, 2020

@aadlung Thanks for creating this issue! We will sure add this as a parameter, I will also check whether it makes sense to add the remaining parameters as well.

@maechler
Copy link
Member

maechler commented Jun 1, 2020

@aadlung I added this parameter in v2.3.2 which I just released.

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

2 participants