-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.html
123 lines (111 loc) · 14.6 KB
/
sample.html
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
121
122
123
<html>
<head>
<meta charset="utf-8"/>
<script type="text/javascript" src="dist/kage_bundle.js"></script>
<script type="text/javascript">
function draw() {
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var kage = new kage_export.Kage(kage_export.FONTTYPE.MINCHO);
function getSVG(data){
var polygons = new kage_export.Polygons();
kage.makeGlyph(polygons, data);
return polygons.generateSVG2();
}
kage.kBuhin.push("u6f5f-j","99:0:0:3:0:157:200:u6c35-01$99:0:0:49:0:196:200:u8204@3");
kage.kBuhin.push("u6c35-01","2:7:8:31:20:56:27:67:41$2:7:8:12:66:39:73:49:87$2:7:8:14:133:49:142:45:184$2:32:7:40:150:44:138:86:67");
kage.kBuhin.push("u8204@3","99:0:0:0:0:200:200:u81fc-03$2:0:7:81:93:59:129:16:151$1:2:2:67:114:173:114$2:22:4:173:114:173:158:160:182$2:7:8:53:133:54:165:35:177$2:7:8:72:132:83:153:79:170$2:7:8:94:130:109:143:113:163$2:7:8:118:126:137:136:144:153");
kage.kBuhin.push("u81fc-03","2:0:7:96:19:72:28:40:35$1:12:13:40:35:40:89$1:2:0:40:60:97:60$1:0:2:110:31:160:31$1:22:23:160:31:160:89$1:0:2:109:60:160:60$1:2:2:40:89:160:89");
kage.kBuhin.push("testdata1","1:0:0:15:28:72:28$1:2:2:62:139:165:139$2:32:4:142:37:82:59:95:166$1:0:0:18:49:71:49$1:0:0:13:69:66:69$1:0:0:12:96:63:117$1:0:0:23:113:76:113$1:32:23:64:139:64:181$1:32:4:150:139:123:165$1:0:4:85:37:176:37$2:7:8:148:67:129:95:162:114$1:0:2:11:181:64:181$7:0:7:52:102:52:147:52:167:16:163$3:0:5:152:58:152:95:189:95$7:0:7:162:53:162:98:162:118:126:114$1:0:0:127:172:180:172$3:0:5:141:126:141:163:182:163$1:0:0:112:98:129:106$2:0:7:93:22:99:56:120:75$2:7:0:122:17:120:45:84:61$2:0:7:109:123:89:110:78:82$1:22:23:19:120:19:153$2:22:5:118:147:118:188:88:185$2:12:7:184:17:180:36:169:59$4:22:5:32:49:11:83:52:83");
kage.kBuhin.push("testdata2","2:0:5:23:32:61:15:95:47$2:32:4:76:74:98:99:74:125$6:0:5:94:62:144:117:223:51:166:77$3:12:5:153:115:175:140:151:166$3:12:5:107:131:80:156:105:182$6:7:4:20:93:6:120:23:155:35:183$6:7:8:107:25:175:18:137:74:179:40$3:22:5:43:54:43:76:29:101$2:22:5:178:135:201:196:164:182$2:0:5:75:101:87:141:48:141$3:0:5:73:144:85:184:46:184");
kage.kBuhin.push("testdata3","1:0:0:22:20:76:20$1:0:0:42:20:96:20$1:0:0:20:44:40:44$1:2:2:60:42:80:42$1:32:32:36:52:46:106$1:12:13:96:68:104:126$1:12:13:158:72:148:128$1:12:13:178:80:178:138$1:12:13:142:40:142:98$1:12:13:28:96:28:154$1:12:13:36:94:36:152$1:12:13:78:72:78:130$1:0:23:112:114:112:172$1:22:4:114:14:114:72$1:22:313:66:126:66:184$1:22:413:184:22:174:58$1:22:413:162:12:162:50$1:22:24:160:168:160:194$1:12:13:91:103:102:161$1:0:0:141:157:141:189");
kage.kBuhin.push("testdata4","2:0:0:30:31:131:10:85:65$2:22:7:32:57:116:60:48:98$2:32:4:35:117:136:96:74:129$2:0:5:119:74:220:53:158:86$2:32:5:114:48:215:27:140:27$2:32:8:123:147:224:126:147:126$2:12:4:24:171:125:150:48:150$2:12:4:149:181:83:181:173:160$2:22:4:130:120:75:121:165:100$2:7:5:84:184:22:184:107:153$2:7:8:43:63:20:104:59:104$2:7:8:83:55:146:96:99:96$2:7:4:57:47:120:88:73:88$2:7:7:6:89:54:116:7:116$2:7:0:6:104:54:131:7:131$2:0:4:54:15:77:82:101:8$2:0:7:12:70:12:27:38:49$2:32:7:174:47:174:5:194:26$2:12:7:154:176:154:197:176:181$2:12:7:12:188:12:157:34:193");
kage.kBuhin.push("testdata5","3:0:0:24:48:52:12:70:40$3:0:5:36:96:60:74:82:88$3:0:5:26:142:50:120:50:150$3:0:5:30:172:54:150:50:182$3:0:5:194:22:144:22:140:54$3:32:5:164:102:126:82:122:114$3:32:5:178:144:134:142:130:174$3:12:5:190:38:154:46:150:78$3:22:5:126:22:96:24:92:56$3:12:5:156:126:156:168:190:168$3:12:5:150:138:150:180:184:180$3:12:5:140:148:140:190:174:190$3:12:5:160:78:160:120:190:122$3:12:5:62:84:62:126:94:126$1:0:0:72:136:116:136$3:0:5:15:87:43:51:43:82$3:12:5:118:110:118:152:74:152");
kage.kBuhin.push("testdata6","4:22:0:16:42:23:68:40:68$4:22:0:122:50:122:81:152:81$4:22:0:140:35:140:66:170:68$4:22:0:144:117:144:148:106:148$4:22:0:158:132:158:163:120:161$4:0:5:72:104:72:135:34:133$4:0:5:60:150:60:181:16:140$4:0:5:89:29:89:60:62:89$4:0:5:104:70:97:99:102:132$4:22:5:180:18:149:46:180:46$4:22:5:25:172:75:195:106:195$4:22:5:118:185:166:185:197:185$4:22:5:26:105:31:83:62:83");
kage.kBuhin.push("testdata7","6:0:0:90:30:85:93:118:96:144:48$6:0:0:123:36:121:80:154:83:180:35$6:32:0:183:73:133:132:166:135:192:87$6:0:8:22:80:22:129:55:132:86:132$6:0:8:9:96:9:145:42:148:75:150$6:0:4:30:39:30:88:78:88:80:111$6:0:4:71:185:140:189:184:163:116:153$6:0:4:70:125:141:125:179:93:115:93");
kage.kBuhin.push("testdata8","7:22:7:72:37:108:60:113:85:43:94$7:12:7:96:113:96:140:36:139:31:174$7:0:7:105:110:105:137:128:156:40:171$7:22:7:158:25:158:63:171:83:83:98$7:12:7:168:25:168:63:181:83:93:98$7:12:7:158:89:158:127:213:148:122:175$7:32:7:121:21:94:22:99:47:29:56$7:32:7:162:157:130:145:135:170:65:179$7:32:7:31:70:54:97:59:122:16:124$7:32:7:19:164:55:119:60:144:4:144$7:32:7:28:36:12:34:16:62:67:27");
kage.kBuhin.push("testdata15","1:2:0:117:24:140:91$1:12:0:142:18:165:85$1:12:0:69:90:69:162$1:12:0:93:138:93:109$1:12:0:129:169:112:133$1:22:0:167:168:150:132$1:22:0:52:62:24:70$1:22:0:119:23:138:58$1:22:0:113:15:170:56$1:12:0:33:98:20:148$1:32:0:190:85:136:105$1:32:0:42:182:42:133$1:22:0:90:147:90:184$1:22:0:86:40:86:20");
kage.kBuhin.push("testdata25","1:0:4:117:59:133:140$1:0:4:167:33:167:116$1:0:4:82:147:74:102$1:0:4:65:76:65:28$1:0:4:79:41:137:19$1:0:4:81:188:139:188$1:0:4:128:31:184:22");
kage.kBuhin.push("testdata16","1:0:0:27:37:173:37$1:32:24:118:37:53:74$1:0:0:14:165:186:165$1:32:24:89:89:158:118$1:32:24:151:48:151:93$1:32:24:17:17:44:109$1:32:24:23:100:40:55");
kage.kBuhin.push("testdata17","2:22:8:166:85:129:109:129:69$2:22:8:92:37:48:60:55:21$2:22:8:73:15:119:61:136:32$2:32:8:70:96:33:120:33:80$1:0:0:47:96:104:96$2:32:4:114:111:77:135:130:167$1:0:0:91:111:148:111$2:32:5:48:123:68:141:77:175$1:0:0:25:123:82:123$2:22:5:157:131:191:156:165:154$2:32:7:130:15:58:18:152:69$1:0:0:107:15:164:15$6:22:5:139:155:182:168:101:182:195:195$6:22:5:50:57:15:74:15:25:78:88$6:22:5:186:20:147:36:149:60:177:73$2:32:8:36:137:4:163:35:174$2:7:8:84:149:107:172:95:187$6:7:8:103:58:88:76:122:86:114:96$6:22:8:33:18:3:30:33:40:25:50$6:22:8:183:89:198:104:180:110:172:120$2:32:8:90:133:50:149:79:164$2:32:8:101:133:121:151:130:185$1:0:0:78:133:135:133");
kage.kBuhin.push("testdata18","2:7:0:7:6:27:83:79:42$2:7:0:35:13:55:90:113:72$2:0:7:48:72:68:149:5:141$2:7:0:124:32:146:106:83:98$6:7:0:131:87:146:137:103:119:90:153$6:7:0:190:80:138:89:162:112:163:140$6:7:0:183:21:131:30:155:53:155:74$6:7:0:150:138:97:149:63:189:129:185$6:7:4:86:132:46:116:35:161:65:179$6:0:7:149:12:107:6:98:41:128:59$6:22:7:194:150:147:163:143:179:173:197$6:7:8:47:64:16:67:2:92:26:111$2:7:8:184:35:192:61:174:68");
kage.kBuhin.push("testdata20","2:0:0:57:147:97:147:138:147$3:0:0:16:107:56:107:71:144$3:0:0:46:102:86:102:86:143$3:0:0:50:63:90:63:82:104$3:0:0:24:21:24:61:76:61$3:0:0:113:27:113:67:90:67$3:0:0:138:36:138:76:114:56$2:0:5:159:127:161:168:135:147$2:0:5:172:31:174:72:142:72$2:0:5:97:83:99:124:135:124$2:0:5:24:130:26:171:54:148$2:0:5:87:160:89:201:106:149");
kage.kBuhin.push("testdata21","2:0:7:137:155:154:166:178:177$2:0:7:115:76:113:97:137:108$2:0:7:156:71:149:88:147:103$2:0:7:32:169:54:172:78:183$2:0:7:65:151:90:159:114:170$2:0:7:63:62:66:76:72:96$2:0:7:22:71:32:90:61:96$2:0:7:41:109:52:124:76:135$2:0:7:91:38:83:53:75:71$2:0:7:120:40:105:49:97:67$2:0:7:156:43:136:46:128:64$2:0:7:97:100:80:97:72:115$2:0:7:150:25:132:15:124:33$2:0:7:179:119:164:106:141:126$2:0:7:56:18:38:19:15:39$2:0:7:63:32:46:37:23:57$2:0:7:186:102:182:84:152:107$2:0:7:193:44:188:7:166:60$2:0:7:120:133:130:76:93:149$2:0:7:170:75:189:35:195:89$2:0:7:101:153:127:124:133:178$2:0:7:154:141:179:127:185:181$2:0:7:12:126:35:121:38:157$2:0:7:62:92:84:94:87:130$2:0:7:93:23:76:37:68:55$2:0:7:102:18:86:5:63:25");
kage.kBuhin.push("testc","2:7:8:90:126:121:126:144:126$2:7:8:113:90:155:90:167:90$2:7:8:120:65:139:65:174:65$2:7:8:21:35:38:44:63:57$2:7:8:35:81:63:95:77:103");
kage.kBuhin.push("taka","1:0:32:104:13:104:37$1:2:0:34:37:186:37$7:12:7:34:37:34:102:34:161:9:189$2:0:7:87:42:69:61:42:76$1:0:0:69:62:69:99$2:0:7:118:43:105:57:82:66$1:12:13:105:57:105:94$2:0:7:153:44:146:49:134:57$1:2:0:105:57:176:57$1:32:32:139:57:139:94$1:2:0:105:69:174:69$1:2:0:105:81:174:81$1:2:0:105:94:180:94$2:0:7:115:98:110:104:102:112$1:12:13:65:112:65:154$1:2:2:65:112:151:112$1:22:23:151:112:151:134$1:2:2:65:123:151:123$1:2:2:65:134:151:134$1:2:0:65:144:187:144$1:2:2:65:154:171:154$2:22:4:171:154:172:166:165:182$2:7:8:52:158:52:175:40:183$2:7:8:75:158:84:169:84:180$2:7:8:98:158:109:166:113:176$2:7:8:125:158:136:163:141:172");
kage.kBuhin.push("5","6:7:7:77:38:58:93:58:93:58:89");
kage.kBuhin.push("u20628-j","7:12:7:36:28:36:94:36:165:10:188$1:2:2:36:28:156:28$6:22:5:156:28:151:160:172:179:183:180");
kage.kBuhin.push("kaze","99:0:0:0:0:200:200:u20628-j$2:0:7:129:48:103:57:52:62$1:12:13:61:84:61:121$1:2:2:61:84:131:84$1:22:23:131:84:131:121$1:2:2:61:121:131:121$1:32:32:96:58:96:160$2:0:7:46:170:81:165:133:155$2:7:8:112:133:135:152:145:176");
kage.kBuhin.push("kisou","1:0:32:59:14:59:38$1:0:0:18:38:96:38$2:7:8:30:42:40:52:45:69$2:0:7:81:45:74:60:62:76$1:0:0:14:76:98:76$1:12:13:32:94:32:123$1:2:2:32:94:82:94$1:22:23:82:94:82:123$1:2:2:32:123:82:123$2:32:7:49:123:49:169:12:187$1:32:32:69:123:69:163$2:0:7:54:171:75:165:104:152$1:0:32:138:14:138:38$1:0:0:102:38:182:38$2:7:8:110:42:120:52:125:69$2:0:7:161:45:154:60:142:76$1:0:0:100:76:186:76$1:12:13:111:94:111:123$1:2:2:111:94:164:94$1:22:23:164:94:164:123$1:2:2:111:123:164:123$2:32:7:127:123:127:176:70:188$3:32:5:147:123:147:175:182:175");
kage.kBuhin.push("tobu","1:0:2:20:28:130:28$6:22:5:130:28:130:73:147:88:178:97$2:0:7:169:30:159:40:138:51$2:7:8:138:51:155:54:166:67$1:0:0:93:40:93:185$2:0:7:76:45:51:62:16:74$7:32:7:54:61:54:100:54:167:14:185$1:0:2:14:100:129:100$6:22:5:129:100:129:151:141:172:178:177$2:0:7:165:107:155:116:136:127$2:7:8:136:127:155:133:166:147");
kage.kBuhin.push("3w","2:7:8:31:20:56:27:67:41$2:7:8:12:66:39:73:49:87$2:7:8:14:133:49:142:45:184$2:12:7:41:146:45:135:86:67$30:32:7:27:138:39:146:48:133$31:32:7:45:166:41:151:45:138");
kage.kBuhin.push("3w2","2:7:8:36:16:56:27:65:42$2:7:8:16:58:38:69:46:86$6:7:8:16:135:38:136:44:152:43:184$2:12:7:38:139:42:130:83:66$2:32:7:32:141:38:137:75:78");
//kage.kBuhin.push("2w2","2:7:8:21:32:41:41:50:58$30:7:8:15:129:34:130:35:135:35:177$2:12:7:35:131:40:121:72:56$2:32:7:38:126:33:130:15:129$30:7:8:52:95:38:128:35:135:35:177");
kage.kBuhin.push("u5315", "2:0:7:154:64:101:91:45:102$3:0:5:45:25:45:176:158:176");
kage.kBuhin.push("u20915-08", "99:0:0:54:6:154:84:u5315:0:0:0$2:0:7:81:84:76:109:60:128$1:0:0:76:104:137:104$1:0:0:57:136:140:136$2:32:7:102:104:101:173:45:188$2:7:8:97:145:122:157:128:171");
kage.kBuhin.push("cdp-8cce-02", "1:0:2:99:24:173:24$2:22:7:173:24:160:42:141:62$2:7:8:113:42:138:55:149:79$1:0:2:95:86:176:86$2:22:7:176:86:168:98:158:110$1:2:0:138:131:182:131$1:32:32:138:86:138:172$2:0:7:111:108:110:170:79:188$6:7:0:106:131:113:160:124:180:177:180");
kage.kBuhin.push("u7591-02", "99:0:0:4:0:164:200:u20915-08:0:0:0$99:0:0:49:0:195:200:cdp-8cce-02:0:0:0");
kage.kBuhin.push("u51ab-01", "2:7:8:21:32:41:41:50:58$2:7:8:13:120:39:144:35:177$2:2:7:28:139:45:116:72:56");
kage.kBuhin.push("u51dd", "99:0:0:2:0:157:200:u51ab-01$99:0:0:5:0:200:200:u7591-02");
kage.kBuhin.push("u7fa8", "99:0:0:0:2:200:176:u7f8a-03$99:0:0:0:9:200:200:u3cc4-04-var-001");
kage.kBuhin.push("u3cc4-04-var-001", "99:0:0:0:73:200:273:u3cc4-03-var-001:0:0:0");
kage.kBuhin.push("u3cc4-03-var-001", "99:0:0:0:-36:198:164:u6c35-01-var-001:0:0:0$2:0:7:104:14:93:47:66:69$1:0:2:91:38:168:38$2:22:7:168:38:165:44:145:64$2:32:7:122:38:116:98:63:113$2:7:0:123:38:128:94:173:109");
kage.kBuhin.push("u6c35-01-var-001", "2:7:8:31:53:50:61:55:71$2:7:8:13:76:32:84:37:95$2:7:8:16:120:46:123:43:151$2:32:7:39:128:44:120:82:60");
kage.kBuhin.push("u7f8a-03", "2:7:8:55:13:71:24:78:41$2:0:7:141:15:132:30:117:47$1:0:0:22:47:178:47$1:32:32:100:47:100:101$1:0:0:30:74:170:74$1:0:0:15:101:185:101");
kage.kBuhin.push("u8108-j", "99:0:0:2:0:153:200:u6708-01$99:0:0:8:0:200:200:u200a2-02");
kage.kBuhin.push("u6708-01", "7:12:7:33:24:33:118:33:173:13:188$1:2:2:33:24:83:24$1:22:4:83:24:83:181$1:2:2:33:67:83:67$1:2:2:33:112:83:112");
kage.kBuhin.push("u200a2-02", "2:0:7:163:19:135:35:91:44$7:12:7:91:44:91:98:91:158:75:182$2:0:7:176:51:140:70:94:78$1:0:0:120:76:120:186$2:0:7:181:88:169:95:149:103$2:7:0:141:69:150:151:181:177");
var polygons = new kage_export.Polygons();
kage.makeGlyph(polygons, "testdata1");
document.getElementById('svg').innerHTML = polygons.generateSVG2();
document.getElementById('eps').innerHTML = polygons.generateEPS();
let element = document.getElementById('canvas');
element.insertAdjacentHTML('beforebegin', getSVG("2w2"));
element.insertAdjacentHTML('beforebegin', getSVG("u6f5f-j"));
element.insertAdjacentHTML('beforebegin', getSVG("u8108-j"));
element.insertAdjacentHTML('beforebegin', getSVG("u51dd"));
element.insertAdjacentHTML('beforebegin', getSVG("u7fa8"));
element.insertAdjacentHTML('beforebegin', getSVG("tobu"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata1"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata2"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata4"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata6"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata3"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata5"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata7"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata8"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata20"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata15"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata17"));
kage.setFont(kage_export.FONTTYPE.GOTHIC);
element.insertAdjacentHTML('beforebegin', getSVG("testdata15"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata25"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata3"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata4"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata5"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata6"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata7"));
element.insertAdjacentHTML('beforebegin', getSVG("testdata8"));
element.insertAdjacentHTML('beforebegin', getSVG("u6f5f-j"));
element.insertAdjacentHTML('beforebegin', getSVG("u51dd"));
element.insertAdjacentHTML('beforebegin', getSVG("u7fa8"));
ctx.fillStyle = "rgb(0, 0, 0)";
for(var i = 0; i < polygons.array.length; i++){
ctx.beginPath();
ctx.moveTo(polygons.array[i].array[0].x, polygons.array[i].array[0].y);
for(var j = 1; j < polygons.array[i].array.length; j++){
ctx.lineTo(polygons.array[i].array[j].x, polygons.array[i].array[j].y);
}
ctx.closePath();
ctx.fill();
}
}
</script>
</head>
<body onload="draw()">
<canvas style="border: 1px #ccc solid;" id="canvas" width="200" height="200"></canvas>
<div id="box"></div>
<textarea id="svg"></textarea>
<textarea id="eps"></textarea>
</body>
</html>