支持 php imagettftext 所有 utf-8 字符的字体

发布于 2024-12-20 14:27:08 字数 64 浏览 3 评论 0原文

我在 php 中使用 imagettftext 来生成图像。有没有支持所有utf-8字符的true type字体?

I'm using imagettftext in php to generate images. Is there a true type font that supports all utf-8 characters?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

唯憾梦倾城 2024-12-27 14:27:08

正如 Brian Neal 在他的评论中所说,UTF-8 只是可以表示 Unicode 字符集中的每个字符的几种编码标准之一,目前该标准包含超过 100000 个条目。

因此,您实际上需要一种 true type 字体,支持当前在这个星球上使用的所有 100k+ unicode 字符(并且它是一个移动目标,因为该集合不断扩展和调整)。

所以我想字面答案是否定的,您应该检查您的前提条件(在您的用例中可能遇到哪些字符子集),并搜索合适的多用途字体。

不过,有人尝试提供覆盖大量 unicode 空间的字体 - search 'Pan-Unicode Fonts' 以获取概述。


(U+2615 - '热饮';)

As Brian Neal stated in his comments, UTF-8 is just one of several encoding standards that can represent every character in the Unicode character set, which currently contains more than 100000 entries.

So you are actually asking for a true type font that supports all 100k+ unicode characters currently in use on this planet (and it's a moving target, as the set gets expanded and adjusted constantly).

So I guess the literal answer is no, and you should probably check your preconditions (what character subsets are likely encountered in your use case), and search for a fitting multi-purpose font.

However, there are attempts to provide fonts that cover large amounts of the unicode space - search for 'Pan-Unicode Fonts' to get an overview.


(U+2615 - 'Hot Beverage' ;)

失退 2024-12-27 14:27:08

最接近的是 Google Noto 字体。

Sans 和 Serif 支持 582 种语言,而 Mono 支持 212 种语言。

链接和更多信息请参见:https://www.google.com/get/noto/

The closest you can get is Google Noto Fonts.

Sans and Serif support 582 languages while Mono supports 212 languages.

Link and more information here: https://www.google.com/get/noto/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文