Revision: 1.1.1.1 - (view) (download)
1 : | ktanaka | 1.1 | ; 単位は400*400の座標系 |
2 : | ; 縦線の太さ | ||
3 : | (declare (minchowidth tateyokoratio minchoheight kazariheight | ||
4 : | tomeheight meshsize) | ||
5 : | special) | ||
6 : | (setq minchowidth 18.0) | ||
7 : | ; 縦線に対する横線の太さの比 | ||
8 : | (setq tateyokoratio 0.25) | ||
9 : | ; 縦線と横線の連結の高さの縦線に対する比 | ||
10 : | ;(setq minchoheight 15.0) | ||
11 : | (setq kazariheight 0.75) | ||
12 : | ; 横線の止めの縦線に対する比 | ||
13 : | (setq tomeheight 1.5) | ||
14 : | ; デフォルトのmeshsizeを十分小さくすると害がない. | ||
15 : | (setq meshsize 0.1) | ||
16 : | ; ライブラリをexfileする | ||
17 : | (cond ((definedp 'kanjilib)) | ||
18 : | (t (exfile 'lib.l))) | ||
19 : | ; | ||
20 : | ; | ||
21 : | ; 点の定義 | ||
22 : | ; | ||
23 : | (defelement mincho ten | ||
24 : | (lets ((dotsize (meshwidth minchowidth)) | ||
25 : | (w (times meshsize 0.5 dotsize)) | ||
26 : | (p0 (grid (car points) dotsize)) | ||
27 : | (p1 (grid (cadr points) dotsize)) | ||
28 : | (len (metric2 p0 p1))) | ||
29 : | (mincho1 | ||
30 : | p0 | ||
31 : | p1 | ||
32 : | '((80 171 136 255) | ||
33 : | ((angle 80 171)(bezier 119 214)(bezier 104 256)(angle 136 255)) | ||
34 : | ((angle 80 171)(bezier 155 204)(bezier 173 251)(angle 136 255))) | ||
35 : | (cond ((lessp (times 3.0 w) len) | ||
36 : | (quotient w 20.0)) | ||
37 : | (t (quotient len 60.0)))))) | ||
38 : | ; | ||
39 : | ; 縦棒の定義 | ||
40 : | ; | ||
41 : | (defelement mincho tate | ||
42 : | (lets ((dotsize (meshwidth minchowidth)) | ||
43 : | (w (times meshsize 0.5 dotsize)) | ||
44 : | (p0 (gridx (car points) dotsize)) | ||
45 : | (p1 (gridx (cadr points) dotsize))) | ||
46 : | (cond ((lessp (times 0.08 w) meshsize) | ||
47 : | (line2 p0 p1 w)) | ||
48 : | (t | ||
49 : | (niku2 p0 p1 0.4 0.4 w (times w 0.92)(times w 0.92) w))))) | ||
50 : | ; | ||
51 : | ; 横棒の定義 | ||
52 : | ; | ||
53 : | (defelement mincho yoko | ||
54 : | (lets ((dotsize (meshwidth (times minchowidth tateyokoratio))) | ||
55 : | (w (times 0.5 meshsize dotsize)) | ||
56 : | (p0 (gridy (car points) dotsize)) | ||
57 : | (p1 (gridy (cadr points) dotsize))) | ||
58 : | (cond ((lessp (times 0.2 w) meshsize) | ||
59 : | (line2 p0 p1 w)) | ||
60 : | (t | ||
61 : | (niku2 p0 p1 0.3 0.3 w (times w 0.8)(times w 0.8) w))))) | ||
62 : | ; | ||
63 : | ; 右上はらいの定義 | ||
64 : | ; | ||
65 : | (defelement mincho migiue | ||
66 : | (lets ((dotsize (meshwidth minchowidth)) | ||
67 : | (w0 (times meshsize 0.5 dotsize)) | ||
68 : | (w1 (times meshsize 0.5)) | ||
69 : | (p0 (gridy (car points) dotsize)) | ||
70 : | (p1 (gridy (cadr points) dotsize)) | ||
71 : | (p2 (gridy (caddr points) 1))) | ||
72 : | (niku3 p0 p1 p2 0.3 0.3 w0 (inter w0 w1 0.3)(inter w0 w1 0.7) w1))) | ||
73 : | ; | ||
74 : | ; 右はらいの定義 | ||
75 : | ; | ||
76 : | (defelement mincho migi | ||
77 : | (lets ((dotsize0 (meshwidth (times minchowidth 0.2))) | ||
78 : | (w0 (times meshsize 0.5 dotsize0)) | ||
79 : | (dotsize1 (meshwidth (times minchowidth 1.0))) | ||
80 : | (w1 (times meshsize 0.5 dotsize1)) | ||
81 : | (p0 (grid (car points) dotsize0)) | ||
82 : | (p1 (cadr points)) | ||
83 : | (p2 (grid (caddr points) dotsize1))) | ||
84 : | (niku3 p0 p1 p2 0.3 0.3 | ||
85 : | w0 (inter w0 w1 0.25)(inter w0 w1 0.75) w1))) | ||
86 : | ; | ||
87 : | ;しんにょう | ||
88 : | ; | ||
89 : | (defelement mincho shin-nyuu | ||
90 : | (lets | ||
91 : | ((dotsize0 (meshwidth (times minchowidth 0.2))) | ||
92 : | (w0 (times meshsize 0.5 dotsize0)) | ||
93 : | (dotsize1 (meshwidth (times minchowidth 1.1))) | ||
94 : | (w1 (times meshsize 0.5 dotsize1)) | ||
95 : | (p0 (grid (car points) dotsize0)) | ||
96 : | (p1 (cadr points)) | ||
97 : | (p2 (grid (caddr points) dotsize1)) | ||
98 : | (len0 (metric2 p0 p1)) | ||
99 : | (len1 (metric2 p1 p2)) | ||
100 : | (len (plus len0 len1))) | ||
101 : | (curve2 p0 (inter2 p0 p1 0.5)(inter2 p2 p1 0.9) p2 | ||
102 : | w0 (inter w0 w1 0.2) w1 w1))) | ||
103 : | ; | ||
104 : | ; まがりたて | ||
105 : | ; | ||
106 : | (defelement mincho magaritate | ||
107 : | (lets ((dotsize (meshwidth minchowidth)) | ||
108 : | (w0 (times meshsize 0.5 dotsize)) | ||
109 : | (w1 (times w0 0.9)) | ||
110 : | (p0 (grid (car points) dotsize)) | ||
111 : | (p1 (cadr points)) | ||
112 : | (p2 (grid (caddr points) dotsize))) | ||
113 : | (curve2 p0 (inter2 p0 p1 0.7)(inter2 p2 p1 0.7) p2 w0 w1 w1 w0))) | ||
114 : | ; | ||
115 : | ; かぎ | ||
116 : | ; | ||
117 : | (defelement mincho kagi | ||
118 : | (lets ((dotsize0 (meshwidth minchowidth)) | ||
119 : | (w0 (times meshsize 0.5 dotsize0)) | ||
120 : | (dotsize1 (meshwidth (times 1.0 minchowidth))) | ||
121 : | (w1 (times meshsize 0.5 dotsize1)) | ||
122 : | (p0 (gridx (car points) dotsize0)) | ||
123 : | (l0 (normlen2 w1 (rot90 (diff2 (caddr points)(cadr points))))) | ||
124 : | (p1 (gridx (gridy (plus2 (cadr points) l0) dotsize1) dotsize0)) | ||
125 : | (p2 (gridy (plus2 (caddr points) l0) dotsize1)) | ||
126 : | (len0 (metric2 p0 p1)) | ||
127 : | (len1 (metric2 p1 p2)) | ||
128 : | (rate0 (min 0.9 (//$ (times w0 4.0) len0))) | ||
129 : | (rate1 (min 0.9 (//$ (times w1 4.0) len1))) | ||
130 : | (p01 (inter2 p1 p0 rate0)) | ||
131 : | (p12 (inter2 p1 p2 rate1))) | ||
132 : | (line2 p0 p01 w0 | ||
133 : | (curve2 p01 (inter2 p1 p01 0.1)(inter2 p1 p12 0.1) p12 w0 w0 w1 w1 | ||
134 : | (line2 p12 p2 w1))))) | ||
135 : | ; 縦左はらいの定義 | ||
136 : | (defelement mincho tatehidari | ||
137 : | (lets ((dotsize (meshwidth minchowidth)) | ||
138 : | (w (times meshsize 0.5 dotsize)) | ||
139 : | (p0 (grid (car points) dotsize)) | ||
140 : | (p1 (grid (cadr points) dotsize)) | ||
141 : | (p2 (grid (caddr points) dotsize)) | ||
142 : | (p3 (grid (cadddr points) dotsize)) | ||
143 : | (l0 (normlen2 w (rot90 (diff2 p0 p1)))) | ||
144 : | (w1 (//$ w (float (costheta l0 (diff2 p3 p2))))) | ||
145 : | (l1 (plus2 (normlen2 w1 (diff2 p3 p2)) | ||
146 : | (normlen2 w1 (diff2 p1 p2))))) | ||
147 : | `(((angle .,(plus2 p0 l0)) | ||
148 : | (angle .,(plus2 p1 l0)) | ||
149 : | (bezier .,(plus2 (inter2 p1 p2 0.5) l0)) | ||
150 : | (bezier .,(plus2 p2 l1)) | ||
151 : | (angle .,p3)) | ||
152 : | ((angle .,(diff2 p0 l0)) | ||
153 : | (angle .,(diff2 p1 l0)) | ||
154 : | (bezier .,(diff2 (inter2 p1 p2 0.5) l0)) | ||
155 : | (bezier .,(diff2 p2 l1)) | ||
156 : | (angle .,p3))))) | ||
157 : | ; こころ | ||
158 : | ; こざと偏の一部 | ||
159 : | ; 縦跳ね | ||
160 : | ; 旁の跳ね | ||
161 : | ; たすき | ||
162 : | |||
163 : | ; さんずい | ||
164 : | ; 左はらいの定義 |
ktanaka Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |