首页 > 解决方案 > 未捕获的 Intervention\Image\Exception\NotSupportedException:内部 GD 字体 () 不可用

问题描述

我正在尝试使用 PHP 作曲家在不同的 x 和 y 坐标中编写文本。我已经nmcteam/image-with-text在我的项目文件夹中下载了 PHP 作曲家并安装了库,但是我现在遇到的问题是这个错误说

Uncaught Intervention\Image\Exception\NotSupportedException:内部 GD 字体 () 不可用。

这些警告也在文件“Text.php”的第 166,182,194 行

     $maxWidthBoundingBox = imagettfbbox($this->size, 0, $this->font, $maxWidthString); //line 166 
       $lineBoundingBox = imagettfbbox($this->size, 0, $this->font, $lineText); // line 182
        $lineBoundingBox = imagettfbbox($this->size, 0, $this->font, $line['text']); // line 194


很明显字体有问题,但我不知道如何解决

标签: phphtml

解决方案


推荐阅读