forked from googlefonts/zcool-qingke-huangyou
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_commands_mergeFonts.txt
104 lines (86 loc) · 4.45 KB
/
build_commands_mergeFonts.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
# list of non-autogenerated asset (excluding py script)
cidfontinfo-SC
cidfontinfo-TC
cidfontinfo-JPS
cidfontinfo-JPN
cmap.raw
feature_SC.fea
feature_TC.fea
feature_JP.fea
FontMenuNameDB
HuaYou-feature-main.fea
HuaYou-feature-template.fea
huayou-override-name.txt
huayou-override-map.txt
jp90-override.txt
jp04-override.txt
UVS_sequence
WD-XLLubrifont-(region).ttf
# building font:
1. merge font together
py merge_font_use_mergeFonts.py
(optional hibernate) ; shutdown /h
1.5. prepare file
- prepare feature_(region).fea (next section)
- prepare CID-keyed UVS file (`py UVS_parser.py`) -> UVS_sequence_CID
2. extract t1 source
tx -t1 .\WD-XLLubrifont-Regular.ttf tempfont_SC.pfa
tx -t1 .\WD-XLLubrifont-Trad.ttf tempfont_TC.pfa
tx -t1 .\WD-XLLubrifont-JP83.ttf tempfont_JP83.pfa
tx -t1 .\WD-XLLubrifont-JP90.ttf tempfont_JP90.pfa
tx -t1 .\WD-XLLubrifont-JP04.ttf tempfont_JP04.pfa
3. merge font together
mergeFonts font.pfa map_SC.txt tempfont_SC.pfa map_TC.txt tempfont_TC.pfa map_JP83.txt tempfont_JP83.pfa map_JP90.txt tempfont_JP90.pfa map_JP04.txt tempfont_JP04.pfa
4. build with makeotf
mergeFonts -cid .\cidfontinfo-SC cidfont-SC.ps .\map_HuaYou.txt font.pfa
mergeFonts -cid .\cidfontinfo-TC cidfont-TC.ps .\map_HuaYou.txt font.pfa
mergeFonts -cid .\cidfontinfo-JPS cidfont-JPS.ps .\map_HuaYou.txt font.pfa
mergeFonts -cid .\cidfontinfo-JPN cidfont-JPN.ps .\map_HuaYou.txt font.pfa
Release build
#SC
makeotf -f cidfont-SC.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_SC.fea -cs 25 -r -ch .\cmap_SC.txt -ci UVS_sequence_CID
#TC
makeotf -f cidfont-TC.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_TC.fea -cs 2 -r -ch .\cmap_TC.txt -ci UVS_sequence_CID
#JP Std
makeotf -f cidfont-JPS.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_JPS.fea -cs 1 -r -ch .\cmap_JP90.txt -ci UVS_sequence_CID
#JP StdN
makeotf -f cidfont-JPN.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_JPN.fea -cs 1 -r -ch .\cmap_JP04.txt -ci UVS_sequence_CID
Dev build
#SC
makeotf -f cidfont-SC.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_SC.fea -cs 25 -ch .\cmap_SC.txt -ci UVS_sequence_CID
#TC
makeotf -f cidfont-TC.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_TC.fea -cs 2 -ch .\cmap_TC.txt -ci UVS_sequence_CID
#JP Std
makeotf -f cidfont-JPS.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_JPS.fea -cs 1 -ch .\cmap_JP90.txt -ci UVS_sequence_CID
#JP StdN
makeotf -f cidfont-JPN.ps -omitMacNames -mf .\FontMenuNameDB -ff .\feature_JPN.fea -cs 1 -ch .\cmap_JP04.txt -ci UVS_sequence_CID
delete signature:
sfntedit -d DSIG .\WD-XLLubrifontSC-Regular.otf
sfntedit -d DSIG .\WD-XLLubrifontTC-Regular.otf
sfntedit -d DSIG .\WD-XLLubrifontJPS-Regular.otf
sfntedit -d DSIG .\WD-XLLubrifontJPN-Regular.otf
5. merge into otc
#escape space in CFF with `, only works in Windows Powershell (quotation marks hv bug)
otf2otc -t CFF` =0 -o WD-XLLubrifont.ttc .\WD-XLLubrifontSC-Regular.otf .\WD-XLLubrifontTC-Regular.otf .\WD-XLLubrifontJPS-Regular.otf .\WD-XLLubrifontJPN-Regular.otf
6. Font check (result store in HTML)
fontbakery check-universal --html check-SC.html WD-XLLubrifontSC-Regular.otf
fontbakery check-universal --html check-TC.html WD-XLLubrifontTC-Regular.otf
fontbakery check-universal --html check-JPStd.html WD-XLLubrifontJPS-Regular.otf
fontbakery check-universal --html check-JPStdN.html WD-XLLubrifontJPN-Regular.otf
fontbakery check-universal --html check-TTC.html WD-XLLubrifont.ttc
Ext: build webfont
py convert_webfonts.py
# building features :
1. auto list SC/TC pair for smpl/trad
py sc-tc-conv/csv-generate.py (both simp-to-trad and trad-to-simp)
copy csv-simp-to-trad.txt and csv-trad-to-simp.txt over
2. generate features for smpl/trad
py split_simp_trad_cid.py (#OLD: run 2 times, change simp-trad to trad-simp, NEW will autorun)
3. run `py fea_convert_name2cid.py` on HuaYou-feature-main.fea (generate HuaYou-feature-CID.fea)
(all files are handled via include now so no need to copy lookup all around)
### OLD ###
2. generate features for smpl/trad: `py split_simp_trad.py`
3. copy all feature inside opentype-simp-to-trad-split.fea and opentype-trad-to-simp-split.fea to HuaYou-feature-main.fea
4. run `py fea_convert_name2cid.py` on HuaYou-feature-main.fea (generate HuaYou-feature-CID.fea)
5. merge HuaYou-feature-CID.fea with HuaYou-feature-template.fea and feature_gsub_SC_to_TC.fea/feature_gsub_TC_to_SC.fea (for locl) in feature_SC.fea
6. remove lookup vert_SC; in vert and vrt2 for feature_TC.fea