Skip to content

Commit

Permalink
set fallback fonts for PDF rendering (#1728)
Browse files Browse the repository at this point in the history
Once a new version of Pandoc is released that includes
jgm/pandoc#9204 and
jgm/pandoc#9353 (both merged), this will fix the
emoji and symbol rendering issues in #1708.

It doesn't seem to be possible to set fallback fonts with
`luatexja-fontspec` (used to configure CJK fonts), which results in some
missing symbols in the translations but at least renders the emoji
properly.

Closes #1708
  • Loading branch information
max-heller authored Mar 7, 2024
1 parent e362b44 commit 97ac0e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/install-mdbook/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ runs:
run: |
cargo install mdbook-pandoc --locked --version 0.5.0
sudo apt-get install -y texlive texlive-luatex texlive-lang-cjk librsvg2-bin fonts-noto
curl -LsSf https://github.com/jgm/pandoc/releases/download/3.1.11/pandoc-3.1.11-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-3.1.11/bin" >> $GITHUB_PATH
curl -LsSf https://github.com/jgm/pandoc/releases/download/3.1.12.2/pandoc-3.1.12.2-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-3.1.12.2/bin" >> $GITHUB_PATH
shell: bash

- name: Install mdbook-i18n-helpers
Expand Down
6 changes: 6 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ pdf-engine = "lualatex"
mainfont = "Noto Serif"
sansfont = "Noto Sans"
monofont = "Noto Sans Mono"
mainfontfallback = ["NotoColorEmoji:mode=harf"]
monofontfallback = [
"NotoColorEmoji:mode=harf",
"NotoSansMath:",
"NotoSansMonoCJKSC:",
]
geometry = ["margin=1.25in"]
linkcolor = "blue"
urlcolor = "red"
Expand Down

0 comments on commit 97ac0e7

Please sign in to comment.