#111190GIFBUILDER TEXT and install tool image tests emit warnings when GD has no FreeType support
Description
Problem
When PHP’s GD extension is linked against a libgd that was built without FreeType, imagettfbbox() and imagettftext() still exist, but every call fails with:
PHP Warning: imagettfbbox(): libgd was not built with FreeType font support in typo3/sysext/core/Classes/Imaging/GraphicsCanvas.php
Such builds exist, for example PHP compiled to WebAssembly (php-wasm/web), which ships GD without any FreeType symbols. Depending on SYS/exceptionalErrors the warning becomes an exception and the image is not rendered at all. The install tool reports “PHP GD library has freetype font support” in this environment, because it only checks function_exists('imagettftext').
Steps to reproduce
- Run TYPO3 on a PHP whose GD reports
gd_info()['FreeType Support'] === falsewhilefunction_exists('imagettftext')is true, e.g. the TYPO3 playground on PHP-WASM. - Render a GIFBUILDER image with a TEXT object, or open the image processing tests in Admin Tools > Environment.
- A warning “libgd was not built with FreeType font support” is raised for every text part; the install tool environment check still claims FreeType support.
Cause
GraphicsCanvas::measureText() and GraphicsCanvas::renderText() call imagettfbbox() / imagettftext() unconditionally (on 14.3 GifBuilder::ImageTTFBBoxWrapper() / ImageTTFTextWrapper() call them directly). Check::checkGdLibFreeTypeSupport() only checks function_exists('imagettftext'), which is true for such builds. The reliable indicator is gd_info()['FreeType Support']
Reviews 1
History 12
-
Gerrit Code Review pushed patch set 1 for main to change 96980 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-21T17:33:56+00:00" > 10/21/26, 17:33 </span> -
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-22T15:25:13+00:00" > 10/22/26, 15:25 </span>
Applied in changeset commit:29862faaf1e599c731e6563862bfeb3e865a55d0.