imagettftext() does not properly render combining chars
Nessuno ha ancora preso questa issue.
- Lingua principale
- C
- Stelle
- 40.4k
- Fork
- 8.2k
- Merge medio
- 2g 13h
- PR unite (30g)
- 96
Descrizione
Description
I'm forwarding this from the ancient https://bugs.php.net/34670; I had reported that a couple of years ago upstream (https://github.com/libgd/libgd/issues/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 https://github.com/libgd/libgd/issues/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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con l’implementazione gdft.c inclusa e riproduci l’esempio PHP fornito usando un carattere combinante. Confronta il suo output con libgd 2.3.3 configurata con libraqm, quindi determina i requisiti di integrazione e delle dipendenze Windows. Il lavoro è completato quando imagettftext() esegue correttamente il rendering dei caratteri combinanti con la libgd inclusa in tutte le build supportate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c, php
- Ambito
- computer-graphics
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100