Skip to content

Commit

Permalink
fix: setup font with script
Browse files Browse the repository at this point in the history
  • Loading branch information
tiankaima committed Aug 30, 2023
1 parent 6c5b8dd commit 96f03aa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup font
run: |
mkdir -p $GITHUB_WORKSPACE/fonts
./setup-font.sh
- name: Typst
uses: lvignoli/typst-action@v0
with:
source_file: |
cheatsheet.typ
env:
TYPST_FONT_PATHS: ${{ github.workspace }}/fonts
- name: Upload PDF file
uses: actions/upload-artifact@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.pdf
*.pdf
fonts/
4 changes: 2 additions & 2 deletions cheatsheet.typ
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#set page("a2", flipped: true)
#set text(
font: "Monaco"
font: "思源宋體"
)

#show raw.where(block: false): it => {
Expand Down Expand Up @@ -32,7 +32,7 @@
]
#raw(command, lang: "bash")

#set text(size: 9pt, font: "DejaVu Sans Mono")
#set text(size: 9pt)
#body
]
}
Expand Down
2 changes: 2 additions & 0 deletions setup-font.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
wget https://github.com/adobe-fonts/source-han-serif/releases/download/2.002R/01_SourceHanSerif.ttc.zip
unzip 01_SourceHanSerif.ttc.zip -d fonts

0 comments on commit 96f03aa

Please sign in to comment.