I'm using imagettftext in php to generate images. Is there a true type font that supports all utf-8 characters?
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/
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' ;)
unsigned short
characters - 65,535 different glyphs. A few code points may share a glyph - Latin Capital A
and Greek Capital Alpha
, for example, but that's about all you can do to artifically extend the range. –
Kimberli 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/
© 2022 - 2024 — McMap. All rights reserved.