0

I am trying to perform some Github action tests as part of a CI workflow. These tests should do quite a bit of pdf / png actions, but I am hitting issues with convert-im6.q16: unable to read font `FreeMono'. I have tried to fix these by installing / reinstalling ghostscript before the tests following some advices online, with no success. Basically the Github action looks like:

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

Where the tests fail with the following output:

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.

This works on my personal Ubuntu 20.04 machine, and I do not think that I have ever needed to tweak ghostscript or convert-im6 (at least nothing that I remember).

Any idea how to fix these issues so that it works on the Github action latest ubuntu in the same way as on my machine?

Zorglub29
  • 6,979
  • 6
  • 20
  • 37

1 Answers1

1

Just found the answer... The SO issues I had found (for example ImageMagick: Error while running convert: convert: unable to read font , ImageMagickError unable to read font `(null)': `(null)' , and the likes) only mentioned that I needed to install ghostscript, gs or related, but in my case I needed both ghostscript and also to install the fonts separately. So adding a separate step:

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

solved my problem. Not sure why I never had this kind of issues on my Ubuntu laptop, guess some configuration differences with the ubuntu-latest provided by github actions (?).

Zorglub29
  • 6,979
  • 6
  • 20
  • 37