使用PHP获取TrueType中可用的字符 [英] get the characters available in TrueType with PHP

查看:146
本文介绍了使用PHP获取TrueType中可用的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获得TrueType字体中所有可用字符的列表?使用PHP。

解决方案

PHP似乎没有任何直接使用的扩展 =http://freetype.sourceforge.net/index2.html =nofollow> FreeType ,即开放源码库,用于处理TrueType字体。



您可能需要使用适当的库来掏出另一种语言,如,它可以让你询问每种字体是否具有特定字形的表示。



<另外,你可以直接在C中写入正确的PHP扩展。


How do I get a list of all characters available in the TrueType font? using PHP.

解决方案

PHP does not seem to have any extension that works directly with FreeType, the reigning open source library to deal with TrueType fonts.

You may have to shell out to another language with an appropriate library, like Perl's Font::FreeType::Glyph, which will let you ask each font whether it has a representation of a particular glyph.

In the alternative, you could write the proper PHP extension directly in C.

这篇关于使用PHP获取TrueType中可用的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆