-1

I'm trying to render Egyptian Hyeroglyphs from Unicode Plane 1 (U+13000..U+1342F) as images with PHP imagettftext()

Here is my code:

$img = imagecreatetruecolor(240, 240);
imagettftext($img, 60, 0, 48, 192, 0, '/path/to/fonts/NotoSansEgyptianHieroglyphs-Regular.ttf', '𓄿');`

NB: This Noto font correctly handles Hieroglyphs such as đ“„ż 𓄿 see here

This question struggles with UTF-8 characters, but I've tested this code successfully on many fonts with many codepoints. Characters are already html entities encoded with &#...; as stated in the documentation and UTF-8 characters (accents, etc.) work fine, at least, according to my tests, up to 65533 (plane 0), but Hieroglyphs are in plane 1 and it seems to be impossible to render anything but a single blank square.

0

1 Answer 1

1

It is not currently possible. libgd does not support Unicode plane 1 characters. It's a known issue since, at least 2015, see https://github.com/libgd/libgd/issues/185

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.