macos - 在 OSX 中找不到 Imagemagick 字体

标签 macos imagemagick homebrew

尝试在 ImageMagick 中向图像添加注释时,失败并显示以下消息:

convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype...

如何让 Imagemagick 找到这些字体?

最佳答案

Nevillethis post 中给出了对我有用的解决方案:

  • 创建 imagemagick 配置文件夹:mkdir ~/.magick
  • this Perl script 保存为 /tmp/script.pl
  • 使脚本可执行:chmod +x /tmp/script.pl
  • 在本地运行脚本并将输出重定向到 type.xml 中的文件 ~/.magick : /tmp/script.pl > ~/.magick/type.xml

  • 这解决了字体问题,而 installing fonduimagemagick pkg 文件和其他一些技巧没有解决。

    伟大的!现在我可以用图像大小和分辨率来注释一些 flickr cats(我想要它来为我正在开发的应用程序找到最佳分辨率)。

    enter image description here

    enter image description here

    enter image description here

    关于macos - 在 OSX 中找不到 Imagemagick 字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32421233/

    相关文章:

    swift - 尝试在 Xcode 中为 OS X App 设置选项卡顺序

    python - pandas to_hdf 函数获取非法指令

    macos - 在 mac 中安装 Homebrew 出现错误

    macos - 安装 IJulia 时出错 : Homebrew and Nettle

    OSX Markdown 预览 PDF 上的 RStudio 出现 Pandoc 错误 43

    ruby - 我无法在 Windows 上安装 rmagick gem

    imagemagick - 使用 ImageMagick 程序将 favicon.ico 转换为 png

    php - 如何让 phpThumb 识别和使用 ImageMagick 安装?

    homebrew - 执行brew更新后Brew损坏

    JavaScriptCore 控制台.log