We use the pandoc program to convert from various input formats (such as Markdown) to various output formats (such as PDF and EPUB). This repository contains our preferred free fonts.
This repository has these font families:
-
Adobe Source Pro
-
Bitstream Vera
-
Liberaton
Adobe Source Pro fonts are widely available, and use a fair license for this work.
-
main font: Source Serif Pro
-
sans font: Source Sans Pro
-
code font: Source Code Pro
Bitstream Vera fonts are widely available, and use a fair license for this work.
-
main font: Bitstream Vera Serif
-
sans font: Bitstream Vera Sans
-
code font: Bitstream Vera Sans Mono
Liberation fonts are widely available, and use a fair license for this work.
-
main font: Liberation Serif
-
sans font: Liberation Sans
-
code font: Liberation Mono
We have tried various ways to install fonts.
-
Download a font file and install it via macOS "Font Book" app. This works well.
-
Download a font file to an expected directory
~/.fonts
. This works well forfc-list
but XeLatex sometimes can't find these fonts. -
Run
brew install --cask font-*
. This works well for general use but XeLatex sometimes can't find these fonts.
In our experience, this way is the most likely to succeed:
-
Download a font file
-
Launch the macOS app "Font Book"
-
Use the app to add the font.
In our experience, this way doesn't work reliably.
We explain it here, in case someone can help solve it.
Commands we try:
brew install --cask font-bitstream-vera-serif
brew install --cask font-bitstream-vera-sans
brew install --cask font-bitstream-vera-sans-mono
brew install --cask font-source-serif-pro
brew install --cask font-source-sans-pro
brew install --cask font-source-code-pro
In practice, the fonts sometimes are not packaged in the brew repo.
In practice, the fonts sometimes don't show up in XeLatex.
In our experience, this way doesn't work reliably.
We explain it here, in case someone can help solve it.
-
Download a font file
.ttf
. -
Put the file into an expected directory such as
~/.fonts
. -
Refresh the font cache by running
sudo fc-cache -fv
. -
Confirm the font has been loaded by running
fc-list | grep Foo
-
Add the mainfont variable to the Pandoc command:
-V mainfont="Foo"
.
To list the xelatex fonts that are usable:
$ fc-list