Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Aug 22, 2024
1 parent 16f8572 commit 427b4b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/generate_release_pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,44 +40,6 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site

- name: Cache Fonts
uses: actions/cache@v4
id: cache-fonts
with:
path: fonts
key: ${{ runner.os }}-fonts-noto_sans_sc-lxgwwenkai

- name: Download Fonts
if: steps.cache-fonts.outputs.cache-hit != 'true'
run: |
if [ -f "${{ env.TYPST_FONT_PATH }}/NotoSansSC-Regular.ttf" ]; then
echo "Font already existed."
else
# Download font metadata
mkdir -p cv
curl -sL "https://fonts.google.com/download/list?family=Noto%20Sans%20SC" > cv/noto_sans_sc_raw.txt
# Remove ")]}'" from the beginning of the file
tail -c +5 cv/noto_sans_sc_raw.txt > cv/noto_sans_sc_metadata.json
# Extract the necessary information from the JSON file
file_refs=$(jq -rc '.manifest.fileRefs[]' cv/noto_sans_sc_metadata.json)
# Download, save the font file to /fonts
mkdir -p ${{ env.TYPST_FONT_PATH }}
while IFS= read -r file_ref; do
filename=$(echo "$file_ref" | jq -r '.filename')
url=$(echo "$file_ref" | jq -r '.url')
fontname=$(basename "$filename")
echo $url $fontname
curl -L "$url" -o "${{ env.TYPST_FONT_PATH }}/$fontname"
done <<< "$file_refs"
ls -l ${{ env.TYPST_FONT_PATH }}
fi
for form in Light Regular Bold; do
curl -L "https://github.com/lxgw/LxgwWenKai/releases/download/v1.330/LXGWWenKai-$form.ttf" -o "${{ env.TYPST_FONT_PATH }}/LXGWWenKai-$form.ttf"
done
- name: Install Fonts
run: |
sudo apt-get install -y fonts-noto-cjk
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
更新时间:{{ build_date }}

[在 GitHub Pages 浏览本书](https://parallel101.github.io/cppguidebook) | [在小彭老师自己维护的镜像上浏览本书](https://142857.red/book)

## 格式约定

> {{ icon.tip }} 用这种颜色字体书写的内容是温馨提示
Expand Down
1 change: 1 addition & 0 deletions docs/llvm_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,7 @@ define dso_local noundef i32 @main() #0 {
ret i32 0
}
```
todo

### 轶事:LLVM IR 不跨平台

Expand Down

0 comments on commit 427b4b1

Please sign in to comment.