我可以将可变字体的功能与 imagettftext() 一起使用吗?

Can I use the capabilities of a variable font with imagettftext()?

当使用 gd2 库时,我可以使用

加载可变字体
imagettftext($image, 24, 0, 10, 100, $black, __DIR__.'/Some-VariableFont.ttf', 'Hello, World!');

但我不知道如何设置重量或宽度等属性。

可能吗?如果是怎么办?

FreeType 有 variable font support 但 GD 没有提供 API 使用它,所以答案是“没有”。