0

I have used "cid0cs" and "stsongstdlight" Fonts for chinese characters ,And all characters comes proper . Following is the chinese chracters :

安吧爸八百北不大岛的弟地东都对多儿二方港哥个关贵国过海好很会 家见叫姐京九可老李零六吗妈么没美妹们明名哪那南你您朋七起千去人认日三上 谁什生师识十是四他她台天湾万王我五西息系先香想小谢姓休学也一亿英友月再张这中字

I want to BOLD this characters in PDF .

I used this : $pdf->SetFont($font, 'BUI', 12);

The output in PDF has only underlines and not Bold and italic .

I also used the English Characters using same fonts to see if the bold and italic comes for them . But for English as well the BOLD and Italic dint come .

ALSO : I tried

$pdf->writeHTML("<span><b>安吧爸八百北不大岛的弟地东都对多儿二方港哥个关贵国过海好很会</b></span>", true, 0, true, true);

$pdf->writeHTML("<span><b>The quick brown fox jumps over the lazy dog</b></span>", true, 0, true, true);

$pdf->writeHTML("<i>The quick brown fox jumps over the lazy dog</i>", true, 0, true, true);

$pdf->writeHTML("<strong>The quick brown fox jumps over the lazy dog</strong>", true, 0, true, true);

$pdf->writeHTML("<span><b>谁什生师识十是四他她台天湾万王我五西息系先香想小谢姓休学也一亿英友月再张这中字</b></span>", true, 0, true, true);

But none of this gave me an bold or italic output .

What can be done for FONT "cid0cs" and "stsongstdlight" to support BOLD and Italic.

Have attached the image of PDF output (As cant find the option to attach the pdf)

enter image description here

Awaited for some helpful reply .

Thanks !

1 Answers1

0

If you import custom fonts, you need to make sure that you include both italic and bold version of these fonts. If you check font's dir in tcpdf lib you'll see that each font has bold, italic and bold italic version included (for example you have times, timesb, timesbi and timesi).