File: m++ipa.pe

package info (click to toggle)
fonts-mplus 063-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 72,312 kB
  • sloc: xml: 24; makefile: 4
file content (120 lines) | stat: -rwxr-xr-x 3,945 bytes parent folder | download | duplicates (5)
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/env fontforge -script

Mplus1p = "mplus-1p-regular.ttf"
Mplus2p = "mplus-2p-regular.ttf"
Mplus1c = "mplus-1c-regular.ttf"
Mplus2c = "mplus-2c-regular.ttf"
Mplus1m = "mplus-1m-regular.ttf"
Mplus2m = "mplus-2m-regular.ttf"
Mplus1mn = "mplus-1mn-regular.ttf"

KanjiFont = "ipag.ttf"

Mplus1p_kanji = "M+1P+IPAG"
Mplus2p_kanji = "M+2P+IPAG"
Mplus1c_kanji = "M+1C+IPAG"
Mplus2c_kanji = "M+2C+IPAG"
Mplus1m_kanji = "M+1M+IPAG"
Mplus2m_kanji = "M+2M+IPAG"
Mplus1mn_kanji = "M+1MN+IPAG"

panose_mono = Array(10);
panose_mono[0] = 2
panose_mono[1] = 5
panose_mono[2] = 3
panose_mono[3] = 9
panose_mono[4] = 0
panose_mono[5] = 0
panose_mono[6] = 0
panose_mono[7] = 0
panose_mono[8] = 0
panose_mono[9] = 0

if (FileAccess(Mplus1p)<0 || FileAccess(Mplus2p)<0 || FileAccess(KanjiFont)<0)
	Print("                     ATTENTION:                     ")
	Print(" this script require IPAFont Ver.003.02 or later.   ")
	Print("                                                    ")
	Print("                       USAGE:                       ")
	Print("                                                    ")
	Print(" 1) put these eight files on current directory.     ")
        Print("      mplus-1p-regular.ttf                          ")
        Print("      mplus-2p-regular.ttf                          ")
        Print("      mplus-1c-regular.ttf                          ")
        Print("      mplus-2c-regular.ttf                          ")
        Print("      mplus-1m-regular.ttf                          ")
        Print("      mplus-2m-regular.ttf                          ")
        Print("      mplus-1mn-regular.ttf                         ")
        Print("      ipag.ttf                                      ")
	Print(" 2) run this script by fontforge.                   ")
        Print("      /usr/local/bin/fontforge -script m++ipa.pe    ")
	Print(" 3) seven new files will be created.                ")
        Print("      M+1P+IPAG.ttf                                 ")
        Print("      M+2P+IPAG.ttf                                 ")
        Print("      M+1C+IPAG.ttf                                 ")
        Print("      M+2C+IPAG.ttf                                 ")
        Print("      M+1M+IPAG.ttf                                 ")
        Print("      M+2M+IPAG.ttf                                 ")
        Print("      M+1MN+IPAG.ttf                                ")
	Print("                                                    ")
	Quit()
endif

family = Mplus1p_kanji
Open(Mplus1p);
ScaleToEm(2048);
MergeFonts(KanjiFont);
SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
Generate(family + ".ttf", "", 4)
Close()

family = Mplus2p_kanji
Open(Mplus2p);
ScaleToEm(2048);
MergeFonts(KanjiFont);
SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
Generate(family + ".ttf", "", 4)
Close()

family = Mplus1c_kanji
Open(Mplus1c);
ScaleToEm(2048);
MergeFonts(KanjiFont);
SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
Generate(family + ".ttf", "", 4)
Close()

family = Mplus2c_kanji
Open(Mplus2c);
ScaleToEm(2048);
MergeFonts(KanjiFont);
SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
Generate(family + ".ttf", "", 4)
Close()

family = Mplus1m_kanji
Open(Mplus1m);
ScaleToEm(2048);
MergeFonts(KanjiFont);
SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
SetPanose(panose_mono)
Generate(family + ".ttf", "", 4)
Close()

family = Mplus2m_kanji
Open(Mplus2m);
ScaleToEm(2048);
MergeFonts(KanjiFont);
SetPanose(panose_mono)
SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
Generate(family + ".ttf", "", 4)
Close()

family = Mplus1mn_kanji
Open(Mplus1mn);
ScaleToEm(2048);
MergeFonts(KanjiFont);
SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
SetPanose(panose_mono)
Generate(family + ".ttf", "", 4)
Close()