-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
ext/gd/tests/gh17373.phpt fails without freetype support in gd #17891
Comments
Wouldn't the following do:
|
On 2025-02-23 11:33:09, Christoph M. Becker wrote:
cmb69 left a comment (php/php-src#17891)
Wouldn't the following do:
````
--SKIPIF--
if (!function_exists("imagefttext")) die("skip no freetype support");
````
Sadly no: this skips the test even if a system gd with freetype
support is being used.
|
Then there would be a bug in ext/gd. If there is freetype support in libgd, the ext/gd function Lines 196 to 199 in 1fa15ab
looks hackish. We should not check for PS: a "proper" libgd.pc should reveal the available features. |
Hold on, I may just be lying. It's possible that |
Confirmed. Con: I'm an idiot. Pro: There's no need to write any autoconf macros. #17891 (comment) is all it takes. Near certain I queried my gd package on the wrong machine. |
This test calls imagefttext(), which may not be available if libgd was built without freetype support. Closes phpGH-17891
Description
The new test in
ext/gd/tests/gh17373.phpt
can fail if gd (bundled or otherwise) does not have freetype support:For the bundled gd, there is the constant
HAVE_GD_FREETYPE
, but fromconfig.m4
I infer that it probably only works with the bundled gd. Fixing it for the system gd is going to be a headache, because (much like png, webp, etc) libgd defines the associated freetype functions whether they work or not. For example,We already have one clever autoconf macro for a similar purpose (image format detection), but the naming scheme and return value are different in this case.
PHP Version
git head
Operating System
No response
The text was updated successfully, but these errors were encountered: