Skip to content

Commit 570d617

Browse files
committed
add noto fonts
1 parent 2e23e89 commit 570d617

2 files changed

Lines changed: 48 additions & 27 deletions

File tree

.travis.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ before_install:
1515
- git config --global user.email yuanbin2014@gmail.com
1616
# update first
1717
- sudo apt-get update -qq
18-
# install sshpass
19-
- sudo apt-get install -y sshpass
20-
# install Chinese fonts
21-
- sudo apt-get install -y fonts-arphic-gbsn00lp fonts-arphic-bsmi00lp
2218
# Install Gitbook
2319
- npm install gitbook-cli -g
2420
- npm install svgexport -g
@@ -33,7 +29,6 @@ before_script:
3329

3430
script:
3531
- mkdir -p ~/upload
36-
# build static website
3732
- cd ~/algorithm-exercise/
3833
- gitbook install && gitbook build .
3934
- gitbook pdf .
@@ -58,28 +53,19 @@ after_success:
5853
- git push -u gitcafe HEAD:deploy --force
5954
- git push -u origin HEAD:deploy --force
6055
# install source code pro
61-
# - mkdir -p /tmp/code_pro
62-
# - cd /tmp/code_pro/
63-
# - wget https://github.com/adobe-fonts/source-code-pro/archive/1.017R.tar.gz
64-
# - tar xzf 1.017R.tar.gz
65-
# - mkdir -p ~/.fonts/fontconfig/conf.d/
66-
# - cp source-code-pro-1.017R/OTF/*.otf ~/.fonts/
67-
# - sudo fc-cache -f -v
68-
# # install google noto Simplified Chinese
69-
# - mkdir -p /tmp/noto
70-
# - cd /tmp/noto
71-
# - wget https://www.google.com/get/noto/pkgs/NotoSansCJKSC-hinted.zip
72-
# - https://www.google.com/get/noto/pkgs/NotoSerif-unhinted.zip
73-
# - unzip NotoSansCJKSC-hinted.zip
74-
# - unzip NotoSerif-unhinted.zip
75-
# - mkdir -p ~/.fonts/noto
76-
# - mv *.otf ~/.fonts/noto
77-
# # update fonts
78-
# - cd ~
79-
# - cp ~/algorithm-exercise/conf/10-latin.conf ~/.fonts/fontconfig/conf.d/
80-
# - cp ~/algorithm-exercise/conf/15-noto-cjksc.conf ~/.fonts/fontconfig/conf.d/
81-
# - cp ~/algorithm-exercise/conf/20-noto-cjk.conf ~/.fonts/fontconfig/conf.d/
82-
# - sudo fc-cache -f -v
56+
- mkdir -p ~/fonts
57+
- cd ~/fonts
58+
- wget https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKSC-hinted.zip
59+
- wget https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKTC-hinted.zip
60+
- unzip NotoSansCJKSC-hinted.zip
61+
- unzip NotoSansCJKTC-hinted.zip
62+
- mkdir -p ~/.fonts/noto
63+
- mv *.otf ~/.fonts/noto
64+
- mkdir -p ~/.fonts/fontconfig/conf.d/
65+
# update fonts
66+
- cd ~
67+
- cp ~/algorithm-exercise/conf/fonts.conf ~/.fonts/fontconfig/conf.d/
68+
- sudo fc-cache -f -v
8369

8470
# blacklist
8571
branches:

conf/fonts.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<fontconfig>
2+
<match target="pattern">
3+
<test qual="any" name="family">
4+
<string>serif</string>
5+
</test>
6+
<edit name="family" mode="prepend" binding="strong">
7+
<string>Noto Sans T Chinese</string>
8+
<string>Noto Sans S Chinese</string>
9+
<string>Noto Sans Japanese</string>
10+
<string>Noto Sans Korean</string>
11+
</edit>
12+
</match>
13+
<match target="pattern">
14+
<test qual="any" name="family">
15+
<string>sans-serif</string>
16+
</test>
17+
<edit name="family" mode="prepend" binding="strong">
18+
<string>Noto Sans T Chinese</string>
19+
<string>Noto Sans S Chinese</string>
20+
<string>Noto Sans Japanese</string>
21+
<string>Noto Sans Korean</string>
22+
</edit>
23+
</match>
24+
<match target="pattern">
25+
<test qual="any" name="family">
26+
<string>monospace</string>
27+
</test>
28+
<edit name="family" mode="prepend" binding="strong">
29+
<string>Noto Sans T Chinese</string>
30+
<string>Noto Sans S Chinese</string>
31+
<string>Noto Sans Japanese</string>
32+
<string>Noto Sans Korean</string>
33+
</edit>
34+
</match>
35+
</fontconfig>

0 commit comments

Comments
 (0)