metanorma / metanorma-docker

Docker container for running the Metanorma toolchain
https://www.metanorma.com
5 stars 3 forks source link

fontist - Aborting without proper fonts installed #99

Closed ghobona closed 3 years ago

ghobona commented 3 years ago

The latest version of the docker image now requires fonts to be downloaded each time.

When I execute docker run, it outputs the font license and then prints "[fontist] Aborting without proper fonts installed, make sure that you have set option --agree-to-terms"

So I then have to execute:

docker run -v "$(pwd)":/metanorma metanorma/mn metanorma compile --agree-to-terms -t ogc -x xml,html,doc document.adoc

This means that it downloads the fonts each time docker run is executed, which adds about a minute to the build time.

ronaldtse commented 3 years ago

@ghobona there is a way to cache the fonts using the Docker image:

$ docker run -v "$(pwd)":/metanorma/ \
  -v ${HOME}/.fontist/fonts/:/config/fonts \
  -w /metanorma metanorma/metanorma \
  metanorma compile -t iso -x xml --agree-to-terms test.adoc

This issue happened when executing the following command: However the issue did not happen when executing the following command:

I'm not sure why this occurs, because both document types should be using the same fonts. Let me file a bug.

CAMOBAP commented 3 years ago

When I execute docker run, it outputs the font license and then prints "[fontist] Aborting without proper fonts installed, make sure that you have set option --agree-to-terms"

@ronaldtse @ghobona this is expected behavior if --agree-to-terms missing

@ronaldtse is right to cache font please use the command from the https://github.com/metanorma/metanorma-docker/issues/99#issuecomment-829274013

ghobona commented 3 years ago

@CAMOBAP @ronaldtse Ok, thanks for the response.

ronaldtse commented 3 years ago

Thanks @ghobona !