moviewyrm/bookwyrm/static/fonts/source_han_sans/README.txt
Joel Bradshaw 284eb620dd Add Source Han font for preview generation to Docker image
Include the license and a README explaining things in the repo itself.

Depending on an external source for this is intended to be temporary,
the goal is to have a Bookywrm-managed source for these, but this should
be stable enough for now.

We build it into the Dockerfile to make it available without adding it
to the git repo itself, because git history is forever and we don't want
to bake large files into the history.

Theoretically it would make sense to gate this download on the
ENABLE_PREVIEW_IMAGES environment variable, but ENV variables aren't
available at Docker image build time (for sensible reasons), so we just
unconditonally download it.

This does mean users will ultimately download it anyway, but the benefit
to doing this over adding it to the git history is that if we switch
fonts, or update this one, or change strategies altogether, this version
of the font will no longer have to be downloaded.

Additionally, the font won't be downloaded until the application is
actually built, which involves a bunch of other downloading (of Docker
images and the like), so it's a reasonable time to do it.
2022-01-24 23:16:14 -08:00

9 lines
497 B
Text

The font file itself is not included in the Git repository to avoid putting
large files in the repo history. The Docker image should download the correct
font into this folder automatically.
In case something goes wrong, the font used is the Variable OTC TTF, available
as of this writing from the Adobe Fonts GitHub repository:
https://github.com/adobe-fonts/source-han-sans/tree/release#user-content-variable-otcs
BookWyrm expects the file to be in this folder, named SourceHanSans-VF.ttf.ttc