Prerequisites
Describe the bug
Summary
Imagick::queryFontMetrics() appears not to work in WordPress Playground.
This looks related to the Imagick/ImageMagick support added in commit 9db2812 where ImageMagick was added to Node.js PHP.wasm builds, but built without font support:
--without-fontconfig
--without-freetype
Because queryFontMetrics() depends on font handling, this seems unsupported or incomplete in Playground.
Request
Can you confirm whether Imagick::queryFontMetrics() is expected to work in WordPress Playground?
If not, it would help to document that text metric APIs are currently not supported because the build does not include the required font stack.
Expected behavior
queryFontMetrics() works in Playground
Actual behavior
Calling Imagick::queryFontMetrics() in Playground causes an error / failure in my plugin.
Playground Link
Steps to reproduce
$imagick = new Imagick();
$draw = new ImagickDraw();
$draw->setFontSize(24);
$draw->setTextEncoding('UTF-8');
$metrics = $imagick->queryFontMetrics($draw, 'Hello World');
var_dump($metrics);
Isolating the problem
Prerequisites
Describe the bug
Summary
Imagick::queryFontMetrics()appears not to work in WordPress Playground.This looks related to the Imagick/ImageMagick support added in commit 9db2812 where ImageMagick was added to Node.js PHP.wasm builds, but built without font support:
--without-fontconfig--without-freetypeBecause
queryFontMetrics()depends on font handling, this seems unsupported or incomplete in Playground.Request
Can you confirm whether
Imagick::queryFontMetrics()is expected to work in WordPress Playground?If not, it would help to document that text metric APIs are currently not supported because the build does not include the required font stack.
Expected behavior
queryFontMetrics()works in PlaygroundActual behavior
Calling
Imagick::queryFontMetrics()in Playground causes an error / failure in my plugin.Playground Link
Steps to reproduce
Isolating the problem