Bug #81617 [Sus->Nab]: text with 90 degree angle not rendered correctly
| From: | cmb@php.net | Date: | Fri, 19 Nov 2021 11:56:55 +0000 |
| Subject: | Bug #81617 [Sus->Nab]: text with 90 degree angle not rendered correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-237867@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81617&edit=1
ID: 81617
Updated by: cmb@php.net
Reported by: dwhile at while dot org dot uk
Summary: text with 90 degree angle not rendered correctly
-Status: Suspended
+Status: Not a bug
Type: Bug
Package: GD related
Operating System: Linux
PHP Version: 8.0.12
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Since this is apparently an issue in libraqm[1], I'm closing this
as not a bug in GD.
[1] <https://github.com/libgd/libgd/issues/790#issuecomment-974005301>
Previous Comments:
------------------------------------------------------------------------
[2021-11-12 17:16:13] cmb@php.net
I'm suspending this ticket until the upstream issue[1] is closed.
[1] <https://github.com/libgd/libgd/issues/790>
------------------------------------------------------------------------
[2021-11-12 13:49:27] cmb@php.net
> Output can be seen at <https://www.while.org.uk/try.png>
That is indeed broken. Anyhow, this looks very much like an
upstream issue, so please report there[1]. But before, also check
whether that happens with other fonts as well, and if possible,
try with GD 2.3.3 or even their master HEAD. Also mention the
freetype version you are using.
[1] <https://github.com/libgd/libgd/issues>
------------------------------------------------------------------------
[2021-11-12 12:50:13] dwhile at while dot org dot uk
I have copied your code (and changed the font path to the relevant Linux format.
Output can be seen at <https://www.while.org.uk/try.png>
------------------------------------------------------------------------
[2021-11-12 12:42:01] dwhile at while dot org dot uk
Yes the text characters are overlayed on top of each other.
GD version is 2.3.2
------------------------------------------------------------------------
[2021-11-12 12:37:21] cmb@php.net
To clarify, the following slightly modified example
<?php
$im = imagecreatetruecolor(30, 300);
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 29, 299, $white);
$text = 'Testing...';
$font = 'C:/Windows/Fonts/Arial.ttf';
imagettftext($im, 20, 90, 26, 221, $grey, $font, $text);
imagettftext($im, 20, 90, 25, 220, $black, $font, $text);
imagepng($im, __DIR__ . "/81617.png");
?>
should give something like <https://imgur.com/a/kH8JmNG>.
It is expected that the text is rendered from bottom to top; if
you want it the other way, use an angle of 270°.
However, if I understand you correctly, in your case the
letters are overlayed. Which GD version do you use?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81617
--
Edit this bug report at https://bugs.php.net/bug.php?id=81617&edit=1