jmaupetit / md2pdf

Markdown to PDF conversion tool
MIT License
268 stars 41 forks source link

Add fonts to docker container #3

Open jmaupetit opened 9 years ago

jmaupetit commented 9 years ago

We need to document custom font installation in a docker container.

jmaupetit commented 8 years ago

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?

krichprollsch commented 8 years ago

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 :/

krichprollsch commented 8 years ago

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...

jmaupetit commented 8 years ago

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?

krichprollsch commented 8 years ago

:+1: