-
Notifications
You must be signed in to change notification settings - Fork 5
/
COMMANDS.txt
105 lines (71 loc) · 5.82 KB
/
COMMANDS.txt
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
### Source Han Mega OTC
## Source Han Sans, Source Han Serif & Source Han Mono
otf2otc -o SourceHan.ttc SourceHanSans.ttc SourceHanSerif.ttc SourceHanMono.ttc
### Noto CJK Mega OTC
## Noto Sans CJK & Noto Serif CJK
otf2otc -o NotoCJK.ttc NotoSansCJK.ttc NotoSerifCJK.ttc
### Source Han + Noto CJK Ultra OTC
## Replace Noto CJK CFFs and 'cmap' tables with Source Han versions
# Extract the Source Han Sans (J) CFFs
#
# $dir = ExtraLight Light Normal Regular Medium Bold Heavy
sfntedit -x CFF=CFF.Sans.$dir SourceHanSans-$dir.otf
# Rename ExtraLight to Thin, Normal to DemiLight, and Heavy to Black
mv CFF.Sans.ExtraLight CFF.Sans.Thin
mv CFF.Sans.Normal CFF.Sans.DemiLight
mv CFF.Sans.Heavy CFF.Sans.Black
# Extract the 10 unique Source Han Sans 'cmap' tables
sfntedit -x cmap=cmap.Sans.jp SourceHanSans-Regular.otf
sfntedit -x cmap=cmap.Sans.kr SourceHanSansK-Regular.otf
sfntedit -x cmap=cmap.Sans.sc SourceHanSansSC-Regular.otf
sfntedit -x cmap=cmap.Sans.tc SourceHanSansTC-Regular.otf
sfntedit -x cmap=cmap.Sans.hk SourceHanSansHC-Regular.otf
sfntedit -x cmap=cmap.Sans.Mono.jp SourceHanSansHW-Regular.otf
sfntedit -x cmap=cmap.Sans.Mono.kr SourceHanSansHWK-Regular.otf
sfntedit -x cmap=cmap.Sans.Mono.sc SourceHanSansHWSC-Regular.otf
sfntedit -x cmap=cmap.Sans.Mono.tc SourceHanSansHWTC-Regular.otf
sfntedit -x cmap=cmap.Sans.Mono.hk SourceHanSansHWHC-Regular.otf
# Insert Source Han Sans CFFs and 'cmap' tables; remove 'DSIG' tables
#
# $dir = Thin Light DemiLight Medium Black
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.jp NotoSansCJKjp-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.kr NotoSansCJKkr-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.sc NotoSansCJKsc-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.tc NotoSansCJKtc-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.hk NotoSansCJKhk-$dir.otf
# $dir = Regular Bold
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.jp NotoSansCJKjp-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.kr NotoSansCJKkr-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.sc NotoSansCJKsc-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.tc NotoSansCJKtc-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.hk NotoSansCJKhk-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.Mono.jp NotoSansMonoCJKjp-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.Mono.kr NotoSansMonoCJKkr-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.Mono.sc NotoSansMonoCJKsc-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.Mono.tc NotoSansMonoCJKtc-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Sans.$dir,cmap=cmap.Sans.Mono.hk NotoSansMonoCJKhk-$dir.otf
# Rebuild Noto Sans CJK Super OTC
otf2otc -o NotoSansCJK.ttc NotoSansCJKjp-Thin.otf NotoSansCJKkr-Thin.otf NotoSansCJKsc-Thin.otf NotoSansCJKtc-Thin.otf NotoSansCJKhk-Thin.otf NotoSansCJKjp-Light.otf NotoSansCJKkr-Light.otf NotoSansCJKsc-Light.otf NotoSansCJKtc-Light.otf NotoSansCJKhk-Light.otf NotoSansCJKjp-DemiLight.otf NotoSansCJKkr-DemiLight.otf NotoSansCJKsc-DemiLight.otf NotoSansCJKtc-DemiLight.otf NotoSansCJKhk-DemiLight.otf NotoSansCJKjp-Regular.otf NotoSansCJKkr-Regular.otf NotoSansCJKsc-Regular.otf NotoSansCJKtc-Regular.otf NotoSansCJKhk-Regular.otf NotoSansMonoCJKjp-Regular.otf NotoSansMonoCJKkr-Regular.otf NotoSansMonoCJKsc-Regular.otf NotoSansMonoCJKtc-Regular.otf NotoSansMonoCJKhk-Regular.otf NotoSansCJKjp-Medium.otf NotoSansCJKkr-Medium.otf NotoSansCJKsc-Medium.otf NotoSansCJKtc-Medium.otf NotoSansCJKhk-Medium.otf NotoSansCJKjp-Bold.otf NotoSansCJKkr-Bold.otf NotoSansCJKsc-Bold.otf NotoSansCJKtc-Bold.otf NotoSansCJKhk-Bold.otf NotoSansMonoCJKjp-Bold.otf NotoSansMonoCJKkr-Bold.otf NotoSansMonoCJKsc-Bold.otf NotoSansMonoCJKtc-Bold.otf NotoSansMonoCJKhk-Bold.otf NotoSansCJKjp-Black.otf NotoSansCJKkr-Black.otf NotoSansCJKsc-Black.otf NotoSansCJKtc-Black.otf NotoSansCJKhk-Black.otf
# Extract the Source Han Serif (J) CFFs
#
# $dir = ExtraLight Light Regular Medium SemiBold Bold Heavy
sfntedit -x CFF=CFF.$dir SourceHanSerif-$dir.otf
# Rename Heavy to Black
mv CFF.Serif.Heavy CFF.Serif.Black
# Extract the four unique Source Han Serif 'cmap' tables
sfntedit -x cmap=cmap.Serif.jp SourceHanSerif-Regular.otf
sfntedit -x cmap=cmap.Serif.kr SourceHanSerifK-Regular.otf
sfntedit -x cmap=cmap.Serif.sc SourceHanSerifSC-Regular.otf
sfntedit -x cmap=cmap.Serif.tc SourceHanSerifTC-Regular.otf
# Insert Source Han Serif CFFs and 'cmap' tables; remove 'DSIG' tables
#
# $dir = ExtraLight Light Regular Medium SemiBold Bold Black
sfntedit -d DSIG -a CFF=CFF.Serif.$dir,cmap=cmap.Serif.jp NotoSerifCJKjp-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Serif.$dir,cmap=cmap.Serif.kr NotoSerifCJKkr-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Serif.$dir,cmap=cmap.Serif.sc NotoSerifCJKsc-$dir.otf
sfntedit -d DSIG -a CFF=CFF.Serif.$dir,cmap=cmap.Serif.tc NotoSerifCJKtc-$dir.otf
# Rebuild Noto Serif CJK Super OTC
otf2otc -o NotoSerifCJK.ttc NotoSerifCJKjp-ExtraLight.otf NotoSerifCJKkr-ExtraLight.otf NotoSerifCJKsc-ExtraLight.otf NotoSerifCJKtc-ExtraLight.otf NotoSerifCJKjp-Light.otf NotoSerifCJKkr-Light.otf NotoSerifCJKsc-Light.otf NotoSerifCJKtc-Light.otf NotoSerifCJKjp-Regular.otf NotoSerifCJKkr-Regular.otf NotoSerifCJKsc-Regular.otf NotoSerifCJKtc-Regular.otf NotoSerifCJKjp-Medium.otf NotoSerifCJKkr-Medium.otf NotoSerifCJKsc-Medium.otf NotoSerifCJKtc-Medium.otf NotoSerifCJKjp-SemiBold.otf NotoSerifCJKkr-SemiBold.otf NotoSerifCJKsc-SemiBold.otf NotoSerifCJKtc-SemiBold.otf NotoSerifCJKjp-Bold.otf NotoSerifCJKkr-Bold.otf NotoSerifCJKsc-Bold.otf NotoSerifCJKtc-Bold.otf NotoSerifCJKjp-Black.otf NotoSerifCJKkr-Black.otf NotoSerifCJKsc-Black.otf NotoSerifCJKtc-Black.otf
## Source Han Sans, Source Han Serif, Source Han Mono, Noto Sans CJK & Noto Serif CJK
otf2otc -o SourceHanNotoCJK.ttc SourceHanSans.ttc SourceHanSerif.ttc SourceHanMono.ttc NotoSansCJK.ttc NotoSerifCJK.ttc
# EOF