gpt4 book ai didi

php - 欧元 (€) 图片ttftext

转载 作者:行者123 更新时间:2023-12-02 07:50:47 26 4
gpt4 key购买 nike

如何使用 imagettftext() 创建 € 符号?我使用的字体“Lucida Grande”包含欧元符号。 也不起作用。

最佳答案

参见the documentation (强调我的):

The text string in UTF-8 encoding.

May include decimal numeric character references (of the form: €) to access characters in a font beyond position 127. The hexadecimal format (like ©) is supported. Strings in UTF-8 encoding can be passed directly.

Named entities, such as ©, are not supported. Consider using html_entity_decode() to decode these named entities into UTF-8 strings (html_entity_decode() supports this as of PHP 5.0.0).

If a character is used in the string which is not supported by the font, a hollow rectangle will replace the character.

您可以尝试使用实际的 € 字符,或对其进行解码,或使用十进制字符引用。请参阅此处查看 FileFormat.Info Unicode Lookup 中的条目,其中包含所有代码格式: http://www.fileformat.info/info/unicode/char/20ac/index.htm 。在这种情况下,它将是

关于php - 欧元 (€) 图片ttftext,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11639286/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com