According to the main features of TCPDF this should support OpenType and OpenType Unicode fonts. However, this does not work with me. I use the latest version (6.2.11)
If I do this (from here: http://www.tcpdf.org/fonts.php):
-->
$fontname = TCPDF_FONTS::addTTFfont('newfont.otf', 'OpenTypeUnicode', '', 32);
$pdf->SetFont($fontname, '', 14, '', true);
<--
I get this error:
"TCPDF ERROR: Could not include font definition file: "
That's because the value of $fontname is "FALSE" and then SetFont not working.
I then tried it with the command line:
./tcpdf_addfont.php -i newfont.otf
This does not work either:
-->
Converting fonts for TCPDF:
*** Output dir set to /var/www/public_html/inc/tcpdf/fonts/
--- ERROR: can't add newfont.otf
--- Process completed with ERRORS!
<--
I have tried this with different fonts, which also use my Windows system (eg BirchStd.otf, AdobeArabic-Bold.otf), always with the same result.
Supports TCPDF OTF fonts not correct? (https://sourceforge.net/p/tcpdf/discussion/435311/thread/52b69364/#2e63)
Is there any way to use .otf fonts with TCPDF?
Best regards
AM
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
According to the main features of TCPDF this should support OpenType and OpenType Unicode fonts. However, this does not work with me. I use the latest version (6.2.11)
If I do this (from here: http://www.tcpdf.org/fonts.php):
-->
$fontname = TCPDF_FONTS::addTTFfont('newfont.otf', 'OpenTypeUnicode', '', 32);
$pdf->SetFont($fontname, '', 14, '', true);
<--
I get this error:
"TCPDF ERROR: Could not include font definition file: "
That's because the value of $fontname is "FALSE" and then SetFont not working.
I then tried it with the command line:
./tcpdf_addfont.php -i newfont.otf
This does not work either:
-->
I have tried this with different fonts, which also use my Windows system (eg BirchStd.otf, AdobeArabic-Bold.otf), always with the same result.
Supports TCPDF OTF fonts not correct? (https://sourceforge.net/p/tcpdf/discussion/435311/thread/52b69364/#2e63)
Is there any way to use .otf fonts with TCPDF?
Best regards
AM
On Wed, 19 Aug 2015 15:30:32 +0000
"anmu" anmu@users.sf.net wrote:
Yup, I use OTF Switzera ADF Light Cd font formerly prepared this way:
tcpdf/fonts/MYOWNFONTS
That should do the trick: creating .ttf file
that you will move one level below (in tcpdf/fonts).
After that, import your font as you'd do with any other TTF.
Jean-Yves