TCPDF Fonts
TCPDF supports TrueTypeUnicode (UTF-8 Unicode), OpenTypeUnicode, TrueType, OpenType, Type1, CID-0 and Core (standard) fonts.
There are two ways to use a new font: embedding it in the PDF or not. When a font is not embedded, it is searched in the system. The advantage is that the PDF file is lighter; on the other hand, if it is not available, a substitution font is used. So it is preferable to ensure that the needed font is installed on the client systems. If the file is to be viewed by a large audience, it is recommended to embed.
The fonts that could be not embedded are only the standard core fonts and CID-0 fonts.
The PDF Core (standard) fonts are:
* courier : Courier
* courierb : Courier Bold
* courierbi : Courier Bold Italic
* courieri : Courier Italic
* helvetica : Helvetica
* helveticab : Helvetica Bold
* helveticabi : Helvetica Bold Italic
* helveticai : Helvetica Italic
* symbol : Symbol
* times : Times New Roman
* timesb : Times New Roman Bold
* timesbi : Times New Roman Bold Italic
* timesi : Times New Roman Italic
* zapfdingbats : Zapf Dingbats
Setting up a font for usage with TCPDF requires the following steps:
1. Convert all font filenames to lowercase and rename using the following schema:
* [basic-font-name-in-lowercase].ttf for regular font
* [basic-font-name-in-lowercase]b.ttf for bold variation
* [basic-font-name-in-lowercase]i.ttf for oblique variation
* [basic-font-name-in-lowercase]bi.ttf for bold oblique variation
2. Generate the font's metrics file.
* For Type1 font files this first step is not necessary because the AFM file is usually shipped with the font. In case you have only a metric file in PFM format, use the pfm2afm utility (fonts/utils/pfm2afm) to get the AFM file. If you own a Type1 font in ASCII format (.pfa), you can convert it to binary format with Type 1 utilities.
* For TrueTypeUnicode or TrueType font files, use the the provided ttf2ufm utility (fonts/utils/ttf2ufm):
$ ttf2ufm -a -F myfont.ttf
* For OpenTypeUnicode or OpenType font files, use the the provided ttf2ufm utility (fonts/utils/ttf2ufm):
$ ttf2ufm -a -F myfont.otf
3. Run makefont.php script.
* For TrueTypeUnicode:
$ php -q makefont.php myfont.ttf myfont.ufm
* For OpenTypeUnicode:
$ php -q makefont.php myfont.otf myfont.ufm
* For TrueType:
$ php -q makefont.php myfont.ttf myfont.afm
* For OpenType:
$ php -q makefont.php myfont.otf myfont.afm
* For Type1:
$ php -q makefont.php myfont.pfb myfont.afm
You may also specify additional parameters:
MakeFont(string $fontfile, string $fmfile [, boolean $embedded [, $enc="cp1252" [, $patch=array()]]])
* $fontfile : Path to the .ttf or .pfb file.
* $fmfile : Path to the .afm file for Type1 and TrueType or .ufm for TrueTypeUnicode.
* $embedded : Set to false to not embed the font, true otherwise (default).
* $enc : Name of the encoding table to use. Default value: cp1252. Omit this parameter for TrueType Unicode, OpenType Unicode and symbolic fonts like Symbol or ZapfDingBats. The encoding defines the association between a code (from 0 to 255) and a character. The first 128 are fixed and correspond to ASCII. The encodings are stored in .map files. Those available are:
o cp1250 (Central Europe)
o cp1251 (Cyrillic)
o cp1252 (Western Europe)
o cp1253 (Greek)
o cp1254 (Turkish)
o cp1255 (Hebrew)
o cp1257 (Baltic)
o cp1258 (Vietnamese)
o cp874 (Thai)
o iso-8859-1 (Western Europe)
o iso-8859-2 (Central Europe)
o iso-8859-4 (Baltic)
o iso-8859-5 (Cyrillic)
o iso-8859-7 (Greek)
o iso-8859-9 (Turkish)
o iso-8859-11 (Thai)
o iso-8859-15 (Western Europe)
o iso-8859-16 (Central Europe)
o koi8-r (Russian)
o koi8-u (Ukrainian)
Of course, the font must contain the characters corresponding to the chosen encoding. The encodings which begin with cp are those used by Windows; Linux systems usually use ISO.
* $patch : Optional modification of the encoding. Empty by default. This parameter gives the possibility to alter the encoding. Sometimes you may want to add some characters. For instance, ISO-8859-1 does not contain the euro symbol. To add it at position 164, pass array(164=>'Euro').
4. Edit and copy resulting files by case:
* For embedded fonts: copy the resulting .php, .z and .ctg.z (if available) files to the TCPDF fonts directory.
* For not-embedding the font, edit the .php file and comment the $file entry.
* For CID-0 fonts (not embeddeed) you have to edit the .php file:
o change the font type to: $type='cidfont0';
o set the default font width by adding the line: $dw=1000;
o remove the $enc, $file and $ctg variables definitions
o add one of the following blocks of text at the end of the file (depends by the language you are using - see the arialunicid0.php file for a working example):
+ // Chinese Simplified
$enc='UniCNS-UTF16-H';
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'CNS1','Supplement'=>0);
include(dirname(__FILE__).'/uni2cid_ac16.php');
+ // Chinese Traditional
$enc='UniGB-UTF16-H';
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'GB1','Supplement'=>2);
include(dirname(__FILE__).'/uni2cid_ag15.php');
+ // Korean
$enc='UniKS-UTF16-H';
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'Korea1','Supplement'=>0);
include(dirname(__FILE__).'/uni2cid_ak12.php');
+ // Japanese
$enc='UniJIS-UTF16-H';
$cidinfo=array('Registry'=>'Adobe', 'Ordering'=>'Japan1','Supplement'=>5);
include(dirname(__FILE__).'/uni2cid_aj16.php');
o copy the .php file to the TCPDF fonts directory.
5. Rename php font files variations using the following schema:
* [basic-font-name-in-lowercase].php for regular font
* [basic-font-name-in-lowercase]b.php for bold variation
* [basic-font-name-in-lowercase]i.php for oblique variation
* [basic-font-name-in-lowercase]bi.php for bold oblique variation
没有合适的资源?快使用搜索试试~ 我知道了~
PHP版最新ERP进销存系统多仓库版ERP(仿金蝶)
共885个文件
php:362个
gif:99个
z:88个
2星 需积分: 50 162 下载量 119 浏览量
2018-07-10
00:31:10
上传
评论 13
收藏 18.41MB ZIP 举报
温馨提示
安装说明: 1、上传到网站根目录. 2、用phpMyadmin导入数据库文件bcb5.sql 3、修改数据库链接文件 /application/config/database.php (记得不要用记事本修改,否则可能会出现验证码显示不了问题,建议用Notepad++) 4、安装好了以后,登陆后台 帐号 admin 密码 jxc888888
资源推荐
资源详情
资源评论
收起资源包目录
PHP版最新ERP进销存系统多仓库版ERP(仿金蝶) (885个子文件)
AUTHORS 7KB
AUTHORS 7KB
AUTHORS 6KB
AUTHORS 902B
AUTHORS 883B
AUTHORS 776B
ChangeLog.10070.BAK 436KB
ChangeLog.9745.BAK 30KB
BUGS 98B
BUGS 98B
BUGS 98B
ChangeLog 436KB
ChangeLog 200KB
ChangeLog 146KB
ChangeLog 30KB
ci_account08fb1179720f6b0ed503468e6aa4467e 65B
ci_account2178a2d4de7f2d82fe443c44c90ed8df 67B
ci_account_info1652707c1662d33c8ab87c061977aae1 67B
ci_account_infoac2da8fdeeded44e3a7bde17be768c0c 67B
ci_address6f61258526d91a372052dd595690b6d7 65B
ci_addresse0dd78eea8dcb7bfd8ca165906f1fdca 67B
ci_admin35addf910a209cb5c54e80ea0ce6c95d 401B
ci_admin76c467fde89607b81e2f7b77c26c4a45 67B
ci_admina5cb71e4ae79ba7062c04e68ee4c1ca8 401B
ci_admind036a2742e8fce24ebd211f8be49c7fc 67B
ci_assistingprop5707b760704cf7c8fd808f95881a127a 67B
ci_assistingpropb2b9528758ba290413696d27f8147723 65B
ci_assistsku230efb23c6355387eb8d62eedcaa5124 67B
ci_assistskuc749543f4776c0595b7a5bc784fd5dec 65B
ci_category002148499dbf95c99d4629116e6c36a1 615B
ci_category0ca0a8122b801ed55c770a9e531be2aa 67B
ci_category28cf9fdb78dd73a698b746d97bbe227f 612B
ci_category304ea7abafcd0bac17bac08b8ce6b0a2 341B
ci_category39fc95df020b629d89ec80d206718313 65B
ci_category3c4c48937f3ef846765597b84ba7f1f9 345B
ci_category92e773d3cdd56b85c12855d6497ab3dc 65B
ci_category9bba5b768cb43849657a081bfb479043 615B
ci_categorya32544c77e9aace8ec31d17ec891346f 612B
ci_categorya6e9461b2705115d94cbc61f58933c5e 65B
ci_categoryb22c80ad52af83d2dd608ce8f0c8a3d1 65B
ci_categorybd32d0eb38b4cd1ff37a0681801af182 67B
ci_categorybe13da2e225dea25a3c3e19c4c42d7b7 65B
ci_categoryc1816ac9fc2eaf74323c59311206c0ab 341B
ci_categorye308bde87c345cbcaeb6bd6374cbbd00 345B
ci_contact18960a5c9699935c9414ca5d5c590af6 65B
ci_contact237e80650232d62ed7df80922857dc99 557B
ci_contact40a874c15994fd5996225a9c72fc46f6 557B
ci_contact6083b7d46972c74c50009e01a837df49 547B
ci_contact8f166b125dd6042b3fa77ec9c140fd4c 65B
ci_contact9aa065f7af6d7e16e9fc566a3da76681 661B
ci_goodsaf295efa65b0871c1ea6cbd774364586 65B
ci_goodsd133a00df451cf3ef9ed4a834516e98a 4KB
ci_goodsd5aacae46f53293b360b8b56fa70d165 4KB
ci_invoice033921f4ab82f6ff34c58d7a5c7c490c 1KB
ci_invoice49ae3ca57ead7ef74535321c70be490e 67B
ci_invoice7a74ce60d9a67c31e7582e54c86053e9 65B
ci_invoice7c0dbc4e7a280ff18ed6f36c71f16283 403B
ci_invoice_info0b347aa697dd49c6d5ae7b53fe109224 895B
ci_invoice_info17fae834217cca9ecfb05f7a51ba95ee 67B
ci_invoice_info1f7a7da912b323caf77c6bd0b874fe54 2KB
ci_invoice_info358238b63d108a30c73df8f47542d61e 2KB
ci_invoice_info54a2e5c3002cdce14827d447f59873a4 895B
ci_invoice_info5c90877283b83d6c6069d317e0196aed 530B
ci_invoice_info6ee8825fb9389d8b150b4fee592d56fc 67B
ci_invoice_info706914dadc00c95be9971850dda9bc84 530B
ci_invoice_info93a5f047333447b992c5c554a30cfae4 67B
ci_invoice_info95b6637db137314b5bb5526b530714e8 530B
ci_invoice_info95f695c8096383ecb96ff4f83762379e 67B
ci_invoice_infoa4340a73dfb889b80db9c14fe6e9f2ad 530B
ci_invoice_infoa4ce9bea81fcc1c52da2cfba42efbf66 895B
ci_invoice_infoa5e0c1ae67bd5c72d6b72aa4ed051ee1 2KB
ci_invoice_infob2608581c881132901ae5a5e7387c4e9 67B
ci_invoice_infob9f8f78df4e4bd45f5f23ecdd5ada89f 67B
ci_invoice_infobf0a1ede3e15779016967ee197141940 895B
ci_invoice_infoc06afab3fa1ba5073920ac7ab26c9d96 6KB
ci_invoice_infodc84160738dd7d65de1b20600cae6545 67B
ci_invoice_infoe7ef1747b462b9f5806a72f96d31e334 67B
ci_invoice_infoe81b4b62b1c7eaf7dcfb2c9bd3476396 3KB
ci_invoice_type1468671e9f8c6dbb6666d4f29e2e81bf 394B
ci_invoice_type46bd333068b01ae251c221e793ae5d04 65B
ci_invoice_type85a63437b014f106d2c5a145f78986f7 65B
ci_invoice_typeb02ebfa2be94f796254c5778c991b3c7 398B
ci_invoicecb7bae86eba6e87c0781995983bd7574 1KB
ci_invoicef742fe4520e6a2b0ac46c77c914eab2e 65B
ci_menu82cd7c1de83e60b3d10569a073aa3511 62KB
ci_menud4176ce28a1e44bc28563a6a167a1c71 67B
ci_optionsf5c88b7da18a90250fa421d589457dbb 382B
ci_staff56b8edbb63225b03c87b1d5f607e2214 65B
ci_staff88f0b7513ee929fadfa5e291fe26c50f 495B
ci_storage46f7e189bfd8981b00f190bbab2d10b9 321B
ci_storage66729b94f86706395936e1fadb4dd01d 65B
ci_unit56eedf342d20504b898987c443e8b2d4 775B
ci_unit96db9baa38d09b2f8b0f8170c4a2f463 65B
ci_unittype4c143e8ddbbe52b5070633c9ef61c592 65B
ci_unittypef152de2acf864428ca08f270ad935429 67B
COPYING 35KB
COPYING 35KB
COPYING 35KB
COPYING 18KB
CREDITS 23KB
共 885 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
- yhq19132019-06-20首页index.php最后一句话,core文件夹的文件缺失了
- mlj03812018-10-16用不了 缺少system目录
- 哇当当2018-11-28这个可以 https://download.csdn.net/download/xianxian5201314/10013264
- 笨鸟先飞PHP2020-01-10安装跑不起来 有问题
caofei277
- 粉丝: 21
- 资源: 38
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功