您尚未登录。

楼主 #1 2018-04-27 21:38:30

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,224
积分: 9197

使用 php 的 lv_utils 工具生成字库.

参考链接: https://github.com/littlevgl/lv_utils

  1. Install PHP:       sudo apt-get install php7.0-cli

  2. Intall the Image manipulator extension for PHP:               sudo apt-get install php7.0-gd

  3. Clone or download the lv_utils repository:             git clone https://github.com/littlevgl/lv_utils.git

  4. 拷贝字库 arial.ttf 到 lv_utils 目录

  5. 执行 php font_conv_core.php "name=arial_20&font=arial.ttf&height=20&bpp=4&uni_first=32&uni_last=126"

  6. 那么 airal_20.c 就是你需要的结果





离线

楼主 #2 2018-04-27 21:42:00

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,224
积分: 9197

Re: 使用 php 的 lv_utils 工具生成字库.

QQ20180427214137.png





离线

#3 2018-04-28 09:13:23

kirito
会员
注册时间: 2018-04-23
已发帖子: 4
积分: 4

Re: 使用 php 的 lv_utils 工具生成字库.

windows下提示:
Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() i
n D:\Documents\Downloads\php-7.0.30-nts-Win32-VC14-x64\font_conv_core.php:299
Stack trace:
#0 D:\Documents\Downloads\php-7.0.30-nts-Win32-VC14-x64\font_conv_core.php(101):
height_corr()
#1 {main}
  thrown in D:\Documents\Downloads\php-7.0.30-nts-Win32-VC14-x64\font_conv_core.
php on line 299

离线

楼主 #4 2018-04-28 10:23:13

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,224
积分: 9197

Re: 使用 php 的 lv_utils 工具生成字库.

kirito 说:

windows下提示:
Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() i
n D:\Documents\Downloads\php-7.0.30-nts-Win32-VC14-x64\font_conv_core.php:299
Stack trace:
#0 D:\Documents\Downloads\php-7.0.30-nts-Win32-VC14-x64\font_conv_core.php(101):
height_corr()
#1 {main}
  thrown in D:\Documents\Downloads\php-7.0.30-nts-Win32-VC14-x64\font_conv_core.
php on line 299

缺php_gd2.dll
首先找下php7安装目录extension下有没有这个文件,
然后去 php.ini 开启: extension=php_gd2.dll





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn