php - 未捕获的 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
很明显字体有问题,但我不知道如何解决
解决方案
推荐阅读
- android - 在android中关闭对话框时是否需要删除TextWatcher?
- reactjs - ReactJS,在创建反应应用程序时如何保持视口初始比例=1.0
- python - 在python中有效地从现有变量创建一个新变量
- javascript - 如何更新对象的某些属性?
- flutter - 为什么 vscode 说资产不存在?扑
- javascript - JavaScript 在解析 XML 字符串时在句子之间添加空格
- twilio - 如何使用发送和等待回复小部件立即收到发送的消息 - Twilio Studio
- html - 单击后如何使图标保持更改状态。使用 CSS
- angular - 错误:无法匹配任何路由。URL 段:'未定义'
- javascript - 如何允许将 js 放入 HTML 文件中