How to implement custom fonts in TCPDF

后端 未结 13 1031
鱼传尺愫
鱼传尺愫 2020-11-28 10:07

In TCPDF, there are only a few fonts to choose from, to create pdf files. I want to set Tahoma as my pdf font. How can I include Tahoma in TCPDF??<

13条回答
  •  生来不讨喜
    2020-11-28 10:53

    the best way i have been tried and worked 100% put your TTF font in fonts folder and then use this constant K_PATH_FONTS + FONT NAME

       $font1 = $this->pdf->addTTFfont(K_PATH_FONTS . 'arial.ttf', 'TrueTypeUnicode', '', 8);
       $this->pdf->SetFont($font1, '', 15, '', false);
    

提交回复
热议问题