I would like to generate a PDF file with TCPDF. The content is generated with TinyMCE. I am using additional fonts I downloaded from fontsquirrel.com. So far so good.
When I select a font in TinyMCE then select the 'BOLD' option, the editor shows me the correct layout, but when the PDF is generated, the regular variant is used.
How can I solve this?
I added the fonts:
$pdf->addTTFfont(K_PATH_FONTS.'/Amaranth-Bold-webfont.ttf', 'TrueTypeUnicode', '', 32);
$pdf->addTTFfont(K_PATH_FONTS.'/Amaranth-webfont.ttf', 'TrueTypeUnicode', '', 32);
$pdf->addTTFfont(K_PATH_FONTS.'/Amaranth-Italic-webfont.ttf', 'TrueTypeUnicode', '', 32);
$pdf->addTTFfont(K_PATH_FONTS.'/Amaranth-BoldItalic-webfont.ttf', 'TrueTypeUnicode', '', 32);
And this is the HTML from TinyMCE:
<p>
<strong>
<span style="font-family: Amaranth-webfont; font-size: 36px;" data-mce-style="font-family: Amaranth-webfont; font-size: 36px;">Example text</span>
</strong>
</p>
Thanks in advance!