Skip to content

Commit c6ff816

Browse files
committed
chj-fonts.sh
1 parent 3a4d7a4 commit c6ff816

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/gitbook-master.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: RisingInIris2017/cjk-fonts-action@v1.0.7
1514
- uses: zanderzhao/gitbook-action@v1.2.4 # https://github.com/ZanderZhao/gitbook-action/releases
1615
with:
1716
token: ${{ secrets.PUBLISH_TOKEN }}
@@ -23,4 +22,4 @@ jobs:
2322
gitbook_pdf_dir: /
2423
gitbook_pdf_name: dble-manual
2524
#font_install: sudo apt-get install fonts-noto-cjk ttf-mscorefonts-installer
26-
#prepare_install: sudo add-apt-repository universe && sudo apt update && sudo apt-get install calibre fonts-arphic-gbsn00lp
25+
prepare_install: bash chj-fonts.sh #sudo add-apt-repository universe && sudo apt update && sudo apt-get install calibre fonts-arphic-gbsn00lp

chj-fonts.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
if [ ! -d /root/.fonts" ] ; then
3+
mkdir /root/.fonts
4+
echo -e "create ~/.fonts/ \n"
5+
fi
6+
7+
# Download
8+
9+
wget -O SourceHanSansHWSC.zip -nv https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSansHWSC.zip
10+
echo -e "download finished"
11+
12+
unzip SourceHanSansHWSC.zip
13+
14+
# Copy fonts to font directory
15+
cp -i OTF/SimplifiedChineseHW/SourceHanSansHWSC-Regular.otf /root/.fonts
16+
cp -i OTF/SimplifiedChineseHW/SourceHanSansHWSC-Bold.otf /root/.fonts
17+
18+
sudo fc-cache -fv
19+

0 commit comments

Comments
 (0)