forked from adobe-fonts/source-han-sans
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCOMMANDS.txt
91 lines (63 loc) · 4.88 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
# Command lines for building Source Han Sans OTFs & OTCs
#
# Version 2014-09-12
#
# To subroutinize the 'CFF' table, which may take several hours for
# the 65,535-glyph fonts, replace "-nS" with "-maxs 30000" in the
# makeotf command line.
#
# To add the "stub" 'DSIG' table to the OpenType/CFF fonts, one of the
# following AFDKO command lines can be used, depending on the directory
# in which it is executed:
#
# sfntedit -a DSIG=../DSIG.bin <font>.otf
# sfntedit -a DSIG=../../DSIG.bin <font>.otf
#
# Important Note: Do not add this 'DSIG' table to the OpenType/CFF
# fonts that are used to build the OTCs, nor to the OTCs themselves.
### Command lines for building the region-specific subset OTFs
### Executed in {ExtraLight,Light,Normal,Regular,Medium,Bold,Heavy}
# Simplified Chinese
makeotf -f cidfont.ps.CN -ff features.CN -fi cidfontinfo.CN -mf ../FontMenuNameDB.SUBSET -r -nS -cs 25 -ch ../UniSourceHanSansCN-UTF32-H
# Traditional Chinese (TW)
makeotf -f cidfont.ps.TW -ff features.TW -fi cidfontinfo.TW -mf ../FontMenuNameDB.SUBSET -r -nS -cs 2 -ch ../UniSourceHanSansTW-UTF32-H -ci ../SourceHanSans_TWHK_sequences.txt
# Japanese
makeotf -f cidfont.ps.JP -ff features.JP -fi cidfontinfo.JP -mf ../FontMenuNameDB.SUBSET -r -nS -cs 1 -ch ../UniSourceHanSansJP-UTF32-H -ci ../SourceHanSans_JP_sequences.txt
# Korean
makeotf -f cidfont.ps.KR -ff features.KR -fi cidfontinfo.KR -mf ../FontMenuNameDB.SUBSET -r -nS -cs 3 -ch ../UniSourceHanSansKR-UTF32-H -ci ../SourceHanSans_KR_sequences.txt
### Command lines for building the language-specific OTFs
### Executed in {ExtraLight,Light,Normal,Regular,Medium,Bold,Heavy}/OTC
# Simplified Chinese
makeotf -f cidfont.ps.OTC.SC -ff features.OTC.SC -fi cidfontinfo.OTC.SC -mf ../../FontMenuNameDB -r -nS -cs 25 -ch ../../UniSourceHanSansCN-UTF32-H
# Traditional Chinese (TW)
makeotf -f cidfont.ps.OTC.TC -ff features.OTC.TC -fi cidfontinfo.OTC.TC -mf ../../FontMenuNameDB -r -nS -cs 2 -ch ../../UniSourceHanSansTW-UTF32-H -ci ../../SourceHanSans_TWHK_sequences.txt
# Japanese
makeotf -f cidfont.ps.OTC.J -ff features.OTC.J -fi cidfontinfo.OTC.J -mf ../../FontMenuNameDB -r -nS -cs 1 -ch ../../UniSourceHanSansJP-UTF32-H -ci ../../SourceHanSans_JP_sequences.txt
# Korean
makeotf -f cidfont.ps.OTC.K -ff features.OTC.K -fi cidfontinfo.OTC.K -mf ../../FontMenuNameDB -r -nS -cs 3 -ch ../../UniSourceHanSansKR-UTF32-H -ci ../../SourceHanSans_KR_sequences.txt
### Command line for building the OTCs (replace $dir with the face name)
### Executed in {ExtraLight,Light,Normal,Regular,Medium,Bold,Heavy}/OTC
otf2otc -t 'CFF '=0 -o SourceHanSans-$dir.ttc SourceHanSans-$dir.otf SourceHanSansK-$dir.otf SourceHanSansSC-$dir.otf SourceHanSansTC-$dir.otf
### Command lines for building the Super OTC
# Command lines for copying the CFF from the Japanese OTF to temporary
# (tmp) copies of the Simplified Chinese, Traditional Chinese, and
# Korean OTFs (replace $dir with the face name)
# Executed in {ExtraLight,Light,Normal,Regular,Medium,Bold,Heavy}/OTC
sfntedit -x CFF=CFF.J SourceHanSans-$dir.otf
cp SourceHanSans-$dir.otf SourceHanSans-$dir.otf.tmp
cp SourceHanSansK-$dir.otf SourceHanSansK-$dir.otf.tmp
cp SourceHanSansSC-$dir.otf SourceHanSansSC-$dir.otf.tmp
cp SourceHanSansTC-$dir.otf SourceHanSansTC-$dir.otf.tmp
sfntedit -a CFF=CFF.J SourceHanSansK-$dir.otf.tmp
sfntedit -a CFF=CFF.J SourceHanSansSC-$dir.otf.tmp
sfntedit -a CFF=CFF.J SourceHanSansTC-$dir.otf.tmp
# Execute the following command lines if a 'DSIG' table is present
# (this removes the 'DSIG' table)
sfntedit -d DSIG SourceHanSans-$dir.otf.tmp
sfntedit -d DSIG SourceHanSansK-$dir.otf.tmp
sfntedit -d DSIG SourceHanSansSC-$dir.otf.tmp
sfntedit -d DSIG SourceHanSansTC-$dir.otf.tmp
# Command line for building the Super OTC
# Executed in the root directory
otf2otc -o SourceHanSans.ttc ExtraLight/OTC/SourceHanSans-ExtraLight.otf.tmp ExtraLight/OTC/SourceHanSansK-ExtraLight.otf.tmp ExtraLight/OTC/SourceHanSansSC-ExtraLight.otf.tmp ExtraLight/OTC/SourceHanSansTC-ExtraLight.otf.tmp Light/OTC/SourceHanSans-Light.otf.tmp Light/OTC/SourceHanSansK-Light.otf.tmp Light/OTC/SourceHanSansSC-Light.otf.tmp Light/OTC/SourceHanSansTC-Light.otf.tmp Normal/OTC/SourceHanSans-Normal.otf.tmp Normal/OTC/SourceHanSansK-Normal.otf.tmp Normal/OTC/SourceHanSansSC-Normal.otf.tmp Normal/OTC/SourceHanSansTC-Normal.otf.tmp Regular/OTC/SourceHanSans-Regular.otf.tmp Regular/OTC/SourceHanSansK-Regular.otf.tmp Regular/OTC/SourceHanSansSC-Regular.otf.tmp Regular/OTC/SourceHanSansTC-Regular.otf.tmp Medium/OTC/SourceHanSans-Medium.otf.tmp Medium/OTC/SourceHanSansK-Medium.otf.tmp Medium/OTC/SourceHanSansSC-Medium.otf.tmp Medium/OTC/SourceHanSansTC-Medium.otf.tmp Bold/OTC/SourceHanSans-Bold.otf.tmp Bold/OTC/SourceHanSansK-Bold.otf.tmp Bold/OTC/SourceHanSansSC-Bold.otf.tmp Bold/OTC/SourceHanSansTC-Bold.otf.tmp Heavy/OTC/SourceHanSans-Heavy.otf.tmp Heavy/OTC/SourceHanSansK-Heavy.otf.tmp Heavy/OTC/SourceHanSansSC-Heavy.otf.tmp Heavy/OTC/SourceHanSansTC-Heavy.otf.tmp
# EOF