-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imageftbbox regression between 2.2.5-5.2 and 2.3.0-2 #814
Comments
Thanks for the report. :) Do you use RAQM? Could you attach the font and script here too please? |
Unfortunately, http://www.mirbsd.org/wtf.cgi?q=RAQM Sure. <?php
$text = "2020-12-23T13:25:44Z";
$font = "./Inconsolatazi4varl_qu-Regular.otf"; // attached
$fontsize = 14;
$bbox = imageftbbox($fontsize, 0, $font, $text);
$ascender = abs($bbox[7]) /* +1 */;
$descender = abs($bbox[1]);
$size_w = abs($bbox[0]) + abs($bbox[2]);
$size_h = $ascender + $descender;
$x = -$bbox[0];
$y = $ascender;
$im = imagecreatetruecolor($size_w, $size_h);
$bgcol = imagecolorallocate($im, 0xDD, 0xDD, 0xDD);
$fgcol = imagecolorallocate($im, 0x00, 0x00, 0x23);
imagefilledrectangle($im, 0, 0, $size_w - 1, $size_h - 1, $bgcol);
imagefttext($im, $fontsize, 0, $x, $y, $fgcol, $font, $text);
imagetruecolortopalette($im, FALSE, 256);
if (0) {
imagepng($im, NULL, 9);
} else {
print_r(array(
"bbox" => $bbox,
"ascender" => $ascender,
"descender" => $descender,
"size_w" => $size_w,
"size_h" => $size_h,
"x" => $x,
"y" => $y,
));
} |
@mirabilos RAQM is an optional library for complex text layout (vertical, RTL and co), https://github.com/HOST-Oman/libraqm I am not sure it is displayed in phpinfo but in the configure line. |
Pierre Joye dixit:
***@***.*** RAQM is an optional library for complex text layout
@(vertical, RTL and co), https://github.com/HOST-Oman/libraqm
Ah, okay. I thought it was some acronym I didn’t know yet.
I am not sure it is displayed in phpinfo but in the configure line.
Easily solved ☻
https://buildd.debian.org/status/package.php?p=libgd2
⇓
https://buildd.debian.org/status/fetch.php?pkg=libgd2&arch=amd64&ver=2.3.0-2&stamp=1588776473&raw=0
⇓
checking whether to support raqm... auto
checking for raqm... no
checking for raqm_create in -lraqm... no
configure: Disabling support for raqm
2.2.5-5.2 doesn’t even show anything to do with raqm.
bye,
//mirabilos
--
(gnutls can also be used, but if you are compiling lynx for your own use,
there is no reason to consider using that package)
-- Thomas E. Dickey on the Lynx mailing list, about OpenSSL
|
but 2.3.x yes, which may have caused the regression.
…On Sun, Jan 30, 2022, 10:03 PM mirabilos ***@***.***> wrote:
Pierre Joye dixit:
***@***.*** RAQM is an optional library for complex text layout
>@(vertical, RTL and co), https://github.com/HOST-Oman/libraqm
Ah, okay. I thought it was some acronym I didn’t know yet.
>I am not sure it is displayed in phpinfo but in the configure line.
Easily solved ☻
https://buildd.debian.org/status/package.php?p=libgd2
⇓
https://buildd.debian.org/status/fetch.php?pkg=libgd2&arch=amd64&ver=2.3.0-2&stamp=1588776473&raw=0
⇓
checking whether to support raqm... auto
checking for raqm... no
checking for raqm_create in -lraqm... no
configure: Disabling support for raqm
2.2.5-5.2 doesn’t even show anything to do with raqm.
bye,
//mirabilos
--
(gnutls can also be used, but if you are compiling lynx for your own use,
there is no reason to consider using that package)
-- Thomas E. Dickey on the Lynx mailing list, about OpenSSL
—
Reply to this email directly, view it on GitHub
<#814 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACE6KEE45ZZMSH53UXFAK3UYVHNLANCNFSM5NDPRZBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Pierre Joye dixit:
but 2.3.x yes, which may cause the regression.
Is that a reply to…
> 2.2.5-5.2 doesn’t even show anything to do with raqm.
… this?
Because 2.3.0-2 is built without, as I cited:
> https://buildd.debian.org/status/fetch.php?pkg=libgd2&arch=amd64&ver=2.3.0-2&stamp=1588776473&raw=0
> ⇓
> checking whether to support raqm... auto
> checking for raqm... no
> checking for raqm_create in -lraqm... no
> configure: Disabling support for raqm
If not, sorry I misunderstood?
bye,
//mirabilos
--
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font. -- Rob Pike in "Notes on Programming in C"
|
I mean it could have been due to raqm. But it is not used. I will
investigate that next week.
…On Sun, Jan 30, 2022, 10:21 PM mirabilos ***@***.***> wrote:
Pierre Joye dixit:
>but 2.3.x yes, which may cause the regression.
Is that a reply to…
>> 2.2.5-5.2 doesn’t even show anything to do with raqm.
… this?
Because 2.3.0-2 is built without, as I cited:
>>
https://buildd.debian.org/status/fetch.php?pkg=libgd2&arch=amd64&ver=2.3.0-2&stamp=1588776473&raw=0
>> ⇓
>> checking whether to support raqm... auto
>> checking for raqm... no
>> checking for raqm_create in -lraqm... no
>> configure: Disabling support for raqm
If not, sorry I misunderstood?
bye,
//mirabilos
--
Sometimes they [people] care too much: pretty printers [and syntax
highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font. -- Rob Pike in "Notes on Programming in C"
—
Reply to this email directly, view it on GitHub
<#814 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACE6KB5UQARVIDDPUZWDGTUYVJRPANCNFSM5NDPRZBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Pierre Joye dixit:
I mean it could have been due to raqm. But it is not used. I will
investigate that next week.
Thanks!
|
Uhm, careful ping? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
imageftbbox returns a too small bounding box in libgd3 2.3.0-2 (Debian bullseye, testing/bookworm, sid) for all PHP versions
To Reproduce
See php/php-src#8001
If I
LD_PRELOAD
libgd3 2.2.5-5.2 (Debian buster)libgd.so.3.0.5
, the correct bounding box is returned.Expected behavior
[ascender] => 13
[descender] => 1
Actual results
[ascender] => 11
[descender] => 0
Environment (please complete the following information):
Additional context
Downstream bugreport: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980759
The text was updated successfully, but these errors were encountered: