3 function makeGlyph(polygons, target){ // void
\r
4 var buhin = this.kBuhin.search(target);
\r
6 this.drawGlyph(polygons, buhin);
\r
9 Kage.prototype.makeGlyph = makeGlyph;
\r
11 function drawGlyph(polygons, glyph){ // void
\r
12 // [glyph] : [stroke]$[stroke]$.....
\r
13 // [stroke] : [column]:[column]:.....
\r
14 var strokes = glyph.split("$");
\r
15 for(var i = 0; i < strokes.length; i++){
\r
16 var columns = strokes[i].split(":");
\r
17 if(Math.floor(columns[0]) != 99){
\r
18 dfDrawFont(this, polygons,
\r
19 Math.floor(columns[0]),
\r
20 Math.floor(columns[1]), Math.floor(columns[2]),
\r
21 Math.floor(columns[3]), Math.floor(columns[4]),
\r
22 Math.floor(columns[5]), Math.floor(columns[6]),
\r
23 Math.floor(columns[7]), Math.floor(columns[8]),
\r
24 Math.floor(columns[9]), Math.floor(columns[10]));
\r
26 var buhin = this.kBuhin.search(columns[7]);
\r
28 this.drawBuhin(polygons, buhin,
\r
29 Math.floor(columns[3]),
\r
30 Math.floor(columns[4]),
\r
31 Math.floor(columns[5]),
\r
32 Math.floor(columns[6]));
\r
37 Kage.prototype.drawGlyph = drawGlyph;
\r
39 function drawBuhin(polygons, glyph, x1, y1, x2, y2){ // void
\r
40 var strokes = glyph.split("$");
\r
41 for(var i = 0; i < strokes.length; i++){
\r
42 var columns = strokes[i].split(":");
\r
43 if(Math.floor(columns[0]) != 99){
\r
44 dfDrawFont(this, polygons,
\r
45 Math.floor(columns[0]),
\r
46 Math.floor(columns[1]),
\r
47 Math.floor(columns[2]),
\r
48 x1 + Math.floor(columns[3]) * (x2 - x1) / 200,
\r
49 y1 + Math.floor(columns[4]) * (y2 - y1) / 200,
\r
50 x1 + Math.floor(columns[5]) * (x2 - x1) / 200,
\r
51 y1 + Math.floor(columns[6]) * (y2 - y1) / 200,
\r
52 x1 + Math.floor(columns[7]) * (x2 - x1) / 200,
\r
53 y1 + Math.floor(columns[8]) * (y2 - y1) / 200,
\r
54 x1 + Math.floor(columns[9]) * (x2 - x1) / 200,
\r
55 y1 + Math.floor(columns[10]) * (y2 - y1) / 200);
\r
57 var buhin = this.kBuhin.search(columns[7]);
\r
59 this.drawBuhin(polygons, buhin,
\r
60 x1 + Math.floor(columns[3]) * (x2 - x1) / 200,
\r
61 y1 + Math.floor(columns[4]) * (y2 - y1) / 200,
\r
62 x1 + Math.floor(columns[5]) * (x2 - x1) / 200,
\r
63 y1 + Math.floor(columns[6]) * (y2 - y1) / 200);
\r
68 Kage.prototype.drawBuhin = drawBuhin;
\r
71 Kage.prototype.kMincho = 0;
\r
72 Kage.prototype.kGothic = 1;
\r
73 this.kShotai = this.kMincho;
\r
76 this.kMinWidthY = 2;
\r
77 this.kMinWidthT = 6;
\r
80 //has KAKATO = 2, no KAKATO = 1
\r
81 this.kL2RDfatten = 1.1;
\r
82 this.kBuhin = new Buhin();
\r