Description
Description
I'm forwarding this from the ancient https://bugs.php.net/34670; I had reported that a couple of years ago upstream (libgd/libgd#758), where the ticket had been closed as WONTFIX; however, that was a week after libgd 2.3.3 had been released, which has optional support for libraqm, which solves the issue, as I found out while investigating on libgd/libgd#861.
The following code:
<?php
$im = imagecreatetruecolor(64, 32);
imagefilledrectangle($im, 0, 0, imagesx($im) - 1, imagesy($im) - 1, 0x000000);
imagettftext($im, 16, 0, 10, 20, 0xffffff, "Arial", hex2bin("c3a461cc88"));
imagegif($im, __DIR__ . "/out.gif");
Resulted in this output (bundled libgd):
But I expected this output instead (libgd 2.3.3 with libraqm):
So to solve this for our bundled libgd, we would need to add support for libraqm (probably that wouldn't be a big deal, if especially gdft.c hadn't been diverged between bundled and external libgd, and I believe there are a couple of important fixes only in bundled libgd). For Windows users, we would also need to build and ship libraqm and its dependencies (at least harfbuzz in this case).
PHP Version
any
Operating System
any