-
Notifications
You must be signed in to change notification settings - Fork 76
65 lines (54 loc) · 2.02 KB
/
chinese.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# Check the GMT Chinese
#
name: Chinese support
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
macos:
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1.4.4
with:
environment-name: gmt
condarc: |
channels:
- conda-forge
- nodefaults
create-args: >-
gmt=6.4.0
- name: Setup Chinese
run: |
mkdir -p ~/.gmt/winfonts/
git clone --depth 1 https://github.com/ZMAlt/winfonts
mv winfonts/*.ttf winfonts/*.ttc ~/.gmt/winfonts
rm -rf winfonts
cat > ~/.gmt/cidfmap << EOF
/STSong-Light <</FileType /TrueType /Path (${HOME}/.gmt/winfonts/simsun.ttc) /SubfontId 0 /CSI [(GB1) 4] >> ;
/STFangsong-Light <</FileType /TrueType /Path (${HOME}/.gmt/winfonts/simfang.ttf) /SubfontId 0 /CSI [(GB1) 4] >> ;
/STHeiti-Regular <</FileType /TrueType /Path (${HOME}/.gmt/winfonts/simhei.ttf) /SubfontId 0 /CSI [(GB1) 4] >> ;
/STKaiti-Regular <</FileType /TrueType /Path (${HOME}/.gmt/winfonts/simkai.ttf) /SubfontId 0 /CSI [(GB1) 4] >> ;
EOF
cat > ~/.gmt/PSL_custom_fonts.txt << EOF
STSong-Light--UniGB-UTF8-H 0.700 1
STFangsong-Light--UniGB-UTF8-H 0.700 1
STHeiti-Regular--UniGB-UTF8-H 0.700 1
STKaiti-Regular--UniGB-UTF8-H 0.700 1
STSong-Light--UniGB-UTF8-V 0.700 1
STFangsong-Light--UniGB-UTF8-V 0.700 1
STHeiti-Regular--UniGB-UTF8-V 0.700 1
STKaiti-Regular--UniGB-UTF8-V 0.700 1
EOF
- name: Run the Chinese script
run: bash source/chinese/GMT_Chinese.sh
- name: Check
run: ls source/chinese/GMT_Chinese.png source/chinese/GMT_Chinese.pdf