如何在fpdf中添加新字体? [英] How do I add a new font to a fpdf?
本文介绍了如何在fpdf中添加新字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将Gotham-book字体添加到fpdf.大多数解释不清楚,也很难理解.我需要一个例子.请有人帮忙吗?
How can I add the Gotham-book font to fpdf. Most explanations are unclear and very difficult to understand. I need an example. Please can someone assist?
推荐答案
没关系 得到我的答案
转到 http://www.fpdf.org/makefont/
转换您的.ttf文件
下载.php和.z文件
Download the .php and the .z file
将这些文件添加到以下文件夹:
fpdf/font
(这是您需要下载的默认文件夹结构,以便fpdf能够正常工作)
Add these files to the following folder:
fpdf/font
(This is the default folder structure that you need to download in order for your fpdf to work)
这是我在文件中使用的代码:
This is the code I have used in my file:
$fpdf->AddFont('Gotham','','Gotham-Book.php');
$fpdf->SetFont('Gotham','',11);
这篇关于如何在fpdf中添加新字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文