tcpdf生成字體工具,新版的tcpdf裏邊沒有tools那個文件夾,需要自己製作字體,這個工具就是生成字體使用的。
生成方法如下:
1)打開CMD ,運行:
ttf2ufm.exe -a -F myfont.ttf
2)
php -q makefontuni.php myfont.ttf myfont.ufm
3) 複製 .php, .z and .ctg.z file to the TCPDF font directory.
4) Rename php font files variations for bold and italic using the following schema:
[basic-font-name]b.php for bold variation
[basic-font-name]i.php for oblique variation
[basic-font-name]bi.php for bold oblique variation
粗體和斜體不是獨立的字體,你在使用字體時指定(第二個參數)一下就可以了
生成的字體在tcpdf使用setfont()使用“B”或“I”無效,使用U下劃線可以,BI不能用是怎麼回事?