TCPDF add new fonts

Copy the fonts to the next TCPDF \ tools directory

Open a CMD window navigate to the TCPDF \ tools directory execute the following command

Our Microsoft elegant black font, for example

 php ./tcpdf_addfont.php -b -t TrueTypeUnicode -f 97 -i msyh.ttf

If successful, the following code will appear CMD

>>> Converting fonts for TCPDF:
*** Output dir set to C:\phpStudy\PHPTutorial\WWW\chuanqi\vendor\tcpdf/fonts/
+++ OK   : C:\phpStudy\PHPTutorial\WWW\chuanqi\vendor\tcpdf\tools\msyh.ttf added
 as msyh
>>> Process successfully completed!

Then Microsoft elegant black font on the conversion is complete and copied to the TCPDF \ fonts directory under the

Fonts can be set directly

 $pdf->SetFont('msyh', '', 10, '', true);

 

If php is not an internal command

Please join php directory environment over quantity

Details, please consult your mother degrees

Tip: If Microsoft elegant black, please purchase a license for commercial !!!!!!!

Guess you like

Origin www.cnblogs.com/binxl/p/12337897.html