【问题标题】:Github action raises "convert-im6.q16: unable to read font `FreeMono'" error and similarGithub 操作引发“convert-im6.q16:无法读取字体‘FreeMono’”错误和类似问题
【发布时间】:2021-09-01 10:13:36
【问题描述】:

我正在尝试执行一些 Github 操作测试,作为 CI 工作流程的一部分。这些测试应该做相当多的 pdf / png 动作,但我遇到了convert-im6.q16: unable to read font `FreeMono' 的问题。我已经尝试通过在测试之前安装/重新安装ghostscript 来解决这些问题,并遵循一些在线建议,但没有成功。基本上 Github 操作看起来像:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      
      - name: quick tests
        run: |
          cd src
          bash install.sh
          cd ../tests/
          bash run_all_tests.sh

测试失败并显示以下输出:

convert-im6.q16: unable to read font `FreeMono' @ warning/annotate.c/RenderType/915.
convert-im6.q16: unable to read font `FreeMono' @ error/annotate.c/RenderFreetype/1338.
convert-im6.q16: non-conforming drawing primitive definition `text' @ error/draw.c/RenderMVGContent/4300.
convert-im6.q16: unable to read font `FreeMono' @ warning/annotate.c/RenderType/915.
convert-im6.q16: unable to read font `FreeMono' @ error/annotate.c/RenderFreetype/1338.
convert-im6.q16: non-conforming drawing primitive definition `text' @ error/draw.c/RenderMVGContent/4300.

这适用于我的个人 Ubuntu 20.04 机器,我认为我不需要调整 ghostscript 或 convert-im6(至少我记得没有)。

知道如何解决这些问题,使其在 Github action latest ubuntu 上的工作方式与在我的机器上一样吗?

【问题讨论】:

    标签: fonts github-actions


    【解决方案1】:

    刚刚找到答案...我发现的 SO 问题(例如 ImageMagick: Error while running convert: convert: unable to read fontImageMagickError unable to read font `(null)': `(null)' 等)只提到我需要安装 ghostscriptgs 或相关,但在我的情况我需要ghostscript 和单独安装字体。所以添加一个单独的步骤:

         - name: install ghostscript and its fonts
            run: |
              sudo apt-get install ghostscript
              sudo apt-get install fonts-freefont-otf
    

    解决了我的问题。不知道为什么我的 Ubuntu 笔记本电脑上从来没有出现过这种问题,猜测与 github 操作提供的 ubuntu-latest 的一些配置差异(?)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-25
      • 1970-01-01
      • 2020-01-10
      • 2021-09-14
      • 1970-01-01
      • 2019-08-28
      • 1970-01-01
      • 2020-10-16
      相关资源
      最近更新 更多