md2pdf
md2pdf copied to clipboard
Add fonts to docker container
We need to document custom font installation in a docker container.
Maybe adding something like the following to the Dockerfile would be sufficient:
# Copy local fonts in an indexable place
COPY /srv/fonts ~/.fonts
# Update font cache
RUN fc-cache -f -v
Any font file under the local fonts
directory will then be indexed and fully available.
@krichprollsch @lunika WDYT?
I'm not a font specialist, but you could use a volume instead to load the fonts dynamically into the dir/usr/share/fonts/
of the container.
But that's mean you should also run fc-cache -f -v
at runtime :/
Or maybe using a volume to share your "compiled" fonts from your computer to the container to avoid the fc-cache
at runtime ? I don't know if it's possible...
After a brief discussion with @themouette, we think it's not that bad to rebuild your container when you need to use a new font. @krichprollsch do you agree?
:+1: