1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-01 22:19:21 +02:00

set fallback fonts for PDF rendering (#1728)

Once a new version of Pandoc is released that includes
https://github.com/jgm/pandoc/pull/9204 and
https://github.com/jgm/pandoc/pull/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
This commit is contained in:
Max Heller 2024-03-07 08:37:52 -05:00 committed by GitHub
parent e362b44b66
commit 97ac0e7caf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

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

View File

@ -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"