TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

Umlauts problem / How to find out correct number of the encoding table?

Open 1bit opened this issue 3 years ago • 1 comments

If adding new TTF-Fonts without setting $enc to 96 or 32, the font has umlaut Problems:

Problem occurs when adding the font like this: TCPDF_FONTS::addTTFfont('Taxon-Regular.ttf', 'TrueType');

No Umlaut Problems when adding the font with Parameter 96 or 32: TCPDF_FONTS::addTTFfont('Taxon-Regular.ttf', 'TrueType', 96); or TCPDF_FONTS::addTTFfont('Taxon-Regular.ttf', 'TrueType', 32);

The class description says: "Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.", see https://tcpdf.org/docs/srcdoc/TCPDF/classes-TCPDF-FONTS/#method_addTTFfont

How can I find out the correct number of the encoding table? I can't find any information about this, but its relevant, otherwise the font is displayed wrongly in the pdf.

Thank you for any more information about this.

1bit avatar Nov 21 '22 12:11 1bit

I can confirm this behavior.

I had a problem with the German umlaut Ä becoming a ~ in the PDF. If I set the encoding to 96 it works.

All other German umlauts like Ö Ü ä ö ü also work with auto encoding.

TCPDF version 6.6.2 and PHP 7.4.32

Nebucadnezar avatar Jul 25 '23 06:07 Nebucadnezar