Skip to content

Commit

Permalink
install opensans differently
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoow committed Oct 14, 2024
1 parent cfd712d commit 48b8e3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ jobs:
sudo cp -r core-sans-a-fonts/* /usr/local/share/fonts/
sudo fc-cache -f -v
fc-list | grep "Core Sans"
- name: Use Fallback find for fork PRs
- name: Use Fallback font for fork PRs
if: "github.event.pull_request.head.repo.fork"
run: |
sed -i 's/CoreSansA45.ttf/OpenSans-Regular.ttf/g' book/book.toml
sed -i 's/CoreSansA45It.ttf/OpenSans-Italic.ttf/g' book/book.toml
sed -i 's/CoreSansA65It.ttf/OpenSans-BoldItalic.ttf/g' book/book.toml
sed -i 's/CoreSansA45.ttf/Open Sans:style=Regular/g' book/book.toml
sed -i 's/CoreSansA45It.ttf/Open Sans:style=Italic/g' book/book.toml
sed -i 's/CoreSansA65.ttf/Open Sans:style=Bold/g' book/book.toml
sed -i 's/CoreSansA65It.ttf/Open Sans:style=Bold Italic/g' book/book.toml
cat book/book.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install exercise plugin
run: cargo install --path helpers/mdbook-exercise-linker
Expand All @@ -45,7 +47,7 @@ jobs:
cargo install mdbook-pandoc --locked --version 0.7.1
sudo apt-get update
sudo apt-get install -y fonts-noto fonts-open-sans calibre pdftk
sudo fc-cache -f -v
export PANDOC_VERSION=3.3
curl -LsSf https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-${PANDOC_VERSION}/bin" >> $GITHUB_PATH
Expand Down
1 change: 1 addition & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ show-hidden-lines = true
[output.pandoc.profile.pdf] # options to pass to Pandoc (see https://pandoc.org/MANUAL.html)
output-file = "100-exercises-to-learn-rust.pdf"
to = "latex"
verbosity = "INFO"
highlight-style = "./custom.theme"
# We use `lualatext` because, right now, it's the only engine
# that supports fallback fonts, which we need for emojis.
Expand Down

0 comments on commit 48b8e3c

Please sign in to comment.