Debian Codegraph @

extern/agg24-svn/src/agg_gsv_text.cpp

raw
1 //----------------------------------------------------------------------------
2 // Anti-Grain Geometry - Version 2.4
3 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
4 //
5 // Permission to copy, use, modify, sell and distribute this software
6 // is granted provided this copyright notice appears in all copies.
7 // This software is provided "as is" without express or implied
8 // warranty, and with no claim as to its suitability for any purpose.
9 //
10 //----------------------------------------------------------------------------
11 // Contact: [email protected]
12 // [email protected]
13 // http://www.antigrain.com
14 //----------------------------------------------------------------------------
15 //
16 // Class gsv_text
17 //
18 //----------------------------------------------------------------------------
19 #include <string.h>
20 #include <stdio.h>
21 #include "agg_gsv_text.h"
22 #include "agg_bounding_rect.h"
23
24
25
26 namespace agg
27 {
28 int8u gsv_default_font[] =
29 {
30 0x40,0x00,0x6c,0x0f,0x15,0x00,0x0e,0x00,0xf9,0xff,
31 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
32 0x0d,0x0a,0x0d,0x0a,0x46,0x6f,0x6e,0x74,0x20,0x28,
33 0x63,0x29,0x20,0x4d,0x69,0x63,0x72,0x6f,0x50,0x72,
34 0x6f,0x66,0x20,0x32,0x37,0x20,0x53,0x65,0x70,0x74,
35 0x65,0x6d,0x62,0x2e,0x31,0x39,0x38,0x39,0x00,0x0d,
36 0x0a,0x0d,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
37 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
38 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
39 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
40 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
41 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
42 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
43 0x02,0x00,0x12,0x00,0x34,0x00,0x46,0x00,0x94,0x00,
44 0xd0,0x00,0x2e,0x01,0x3e,0x01,0x64,0x01,0x8a,0x01,
45 0x98,0x01,0xa2,0x01,0xb4,0x01,0xba,0x01,0xc6,0x01,
46 0xcc,0x01,0xf0,0x01,0xfa,0x01,0x18,0x02,0x38,0x02,
47 0x44,0x02,0x68,0x02,0x98,0x02,0xa2,0x02,0xde,0x02,
48 0x0e,0x03,0x24,0x03,0x40,0x03,0x48,0x03,0x52,0x03,
49 0x5a,0x03,0x82,0x03,0xec,0x03,0xfa,0x03,0x26,0x04,
50 0x4c,0x04,0x6a,0x04,0x7c,0x04,0x8a,0x04,0xb6,0x04,
51 0xc4,0x04,0xca,0x04,0xe0,0x04,0xee,0x04,0xf8,0x04,
52 0x0a,0x05,0x18,0x05,0x44,0x05,0x5e,0x05,0x8e,0x05,
53 0xac,0x05,0xd6,0x05,0xe0,0x05,0xf6,0x05,0x00,0x06,
54 0x12,0x06,0x1c,0x06,0x28,0x06,0x36,0x06,0x48,0x06,
55 0x4e,0x06,0x60,0x06,0x6e,0x06,0x74,0x06,0x84,0x06,
56 0xa6,0x06,0xc8,0x06,0xe6,0x06,0x08,0x07,0x2c,0x07,
57 0x3c,0x07,0x68,0x07,0x7c,0x07,0x8c,0x07,0xa2,0x07,
58 0xb0,0x07,0xb6,0x07,0xd8,0x07,0xec,0x07,0x10,0x08,
59 0x32,0x08,0x54,0x08,0x64,0x08,0x88,0x08,0x98,0x08,
60 0xac,0x08,0xb6,0x08,0xc8,0x08,0xd2,0x08,0xe4,0x08,
61 0xf2,0x08,0x3e,0x09,0x48,0x09,0x94,0x09,0xc2,0x09,
62 0xc4,0x09,0xd0,0x09,0xe2,0x09,0x04,0x0a,0x0e,0x0a,
63 0x26,0x0a,0x34,0x0a,0x4a,0x0a,0x66,0x0a,0x70,0x0a,
64 0x7e,0x0a,0x8e,0x0a,0x9a,0x0a,0xa6,0x0a,0xb4,0x0a,
65 0xd8,0x0a,0xe2,0x0a,0xf6,0x0a,0x18,0x0b,0x22,0x0b,
66 0x32,0x0b,0x56,0x0b,0x60,0x0b,0x6e,0x0b,0x7c,0x0b,
67 0x8a,0x0b,0x9c,0x0b,0x9e,0x0b,0xb2,0x0b,0xc2,0x0b,
68 0xd8,0x0b,0xf4,0x0b,0x08,0x0c,0x30,0x0c,0x56,0x0c,
69 0x72,0x0c,0x90,0x0c,0xb2,0x0c,0xce,0x0c,0xe2,0x0c,
70 0xfe,0x0c,0x10,0x0d,0x26,0x0d,0x36,0x0d,0x42,0x0d,
71 0x4e,0x0d,0x5c,0x0d,0x78,0x0d,0x8c,0x0d,0x8e,0x0d,
72 0x90,0x0d,0x92,0x0d,0x94,0x0d,0x96,0x0d,0x98,0x0d,
73 0x9a,0x0d,0x9c,0x0d,0x9e,0x0d,0xa0,0x0d,0xa2,0x0d,
74 0xa4,0x0d,0xa6,0x0d,0xa8,0x0d,0xaa,0x0d,0xac,0x0d,
75 0xae,0x0d,0xb0,0x0d,0xb2,0x0d,0xb4,0x0d,0xb6,0x0d,
76 0xb8,0x0d,0xba,0x0d,0xbc,0x0d,0xbe,0x0d,0xc0,0x0d,
77 0xc2,0x0d,0xc4,0x0d,0xc6,0x0d,0xc8,0x0d,0xca,0x0d,
78 0xcc,0x0d,0xce,0x0d,0xd0,0x0d,0xd2,0x0d,0xd4,0x0d,
79 0xd6,0x0d,0xd8,0x0d,0xda,0x0d,0xdc,0x0d,0xde,0x0d,
80 0xe0,0x0d,0xe2,0x0d,0xe4,0x0d,0xe6,0x0d,0xe8,0x0d,
81 0xea,0x0d,0xec,0x0d,0x0c,0x0e,0x26,0x0e,0x48,0x0e,
82 0x64,0x0e,0x88,0x0e,0x92,0x0e,0xa6,0x0e,0xb4,0x0e,
83 0xd0,0x0e,0xee,0x0e,0x02,0x0f,0x16,0x0f,0x26,0x0f,
84 0x3c,0x0f,0x58,0x0f,0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,
85 0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,
86 0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,
87 0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,0x6c,0x0f,0x10,0x80,
88 0x05,0x95,0x00,0x72,0x00,0xfb,0xff,0x7f,0x01,0x7f,
89 0x01,0x01,0xff,0x01,0x05,0xfe,0x05,0x95,0xff,0x7f,
90 0x00,0x7a,0x01,0x86,0xff,0x7a,0x01,0x87,0x01,0x7f,
91 0xfe,0x7a,0x0a,0x87,0xff,0x7f,0x00,0x7a,0x01,0x86,
92 0xff,0x7a,0x01,0x87,0x01,0x7f,0xfe,0x7a,0x05,0xf2,
93 0x0b,0x95,0xf9,0x64,0x0d,0x9c,0xf9,0x64,0xfa,0x91,
94 0x0e,0x00,0xf1,0xfa,0x0e,0x00,0x04,0xfc,0x08,0x99,
95 0x00,0x63,0x04,0x9d,0x00,0x63,0x04,0x96,0xff,0x7f,
96 0x01,0x7f,0x01,0x01,0x00,0x01,0xfe,0x02,0xfd,0x01,
97 0xfc,0x00,0xfd,0x7f,0xfe,0x7e,0x00,0x7e,0x01,0x7e,
98 0x01,0x7f,0x02,0x7f,0x06,0x7e,0x02,0x7f,0x02,0x7e,
99 0xf2,0x89,0x02,0x7e,0x02,0x7f,0x06,0x7e,0x02,0x7f,
100 0x01,0x7f,0x01,0x7e,0x00,0x7c,0xfe,0x7e,0xfd,0x7f,
101 0xfc,0x00,0xfd,0x01,0xfe,0x02,0x00,0x01,0x01,0x01,
102 0x01,0x7f,0xff,0x7f,0x10,0xfd,0x15,0x95,0xee,0x6b,
103 0x05,0x95,0x02,0x7e,0x00,0x7e,0xff,0x7e,0xfe,0x7f,
104 0xfe,0x00,0xfe,0x02,0x00,0x02,0x01,0x02,0x02,0x01,
105 0x02,0x00,0x02,0x7f,0x03,0x7f,0x03,0x00,0x03,0x01,
106 0x02,0x01,0xfc,0xf2,0xfe,0x7f,0xff,0x7e,0x00,0x7e,
107 0x02,0x7e,0x02,0x00,0x02,0x01,0x01,0x02,0x00,0x02,
108 0xfe,0x02,0xfe,0x00,0x07,0xf9,0x15,0x8d,0xff,0x7f,
109 0x01,0x7f,0x01,0x01,0x00,0x01,0xff,0x01,0xff,0x00,
110 0xff,0x7f,0xff,0x7e,0xfe,0x7b,0xfe,0x7d,0xfe,0x7e,
111 0xfe,0x7f,0xfd,0x00,0xfd,0x01,0xff,0x02,0x00,0x03,
112 0x01,0x02,0x06,0x04,0x02,0x02,0x01,0x02,0x00,0x02,
113 0xff,0x02,0xfe,0x01,0xfe,0x7f,0xff,0x7e,0x00,0x7e,
114 0x01,0x7d,0x02,0x7d,0x05,0x79,0x02,0x7e,0x03,0x7f,
115 0x01,0x00,0x01,0x01,0x00,0x01,0xf1,0xfe,0xfe,0x01,
116 0xff,0x02,0x00,0x03,0x01,0x02,0x02,0x02,0x00,0x86,
117 0x01,0x7e,0x08,0x75,0x02,0x7e,0x02,0x7f,0x05,0x80,
118 0x05,0x93,0xff,0x01,0x01,0x01,0x01,0x7f,0x00,0x7e,
119 0xff,0x7e,0xff,0x7f,0x06,0xf1,0x0b,0x99,0xfe,0x7e,
120 0xfe,0x7d,0xfe,0x7c,0xff,0x7b,0x00,0x7c,0x01,0x7b,
121 0x02,0x7c,0x02,0x7d,0x02,0x7e,0xfe,0x9e,0xfe,0x7c,
122 0xff,0x7d,0xff,0x7b,0x00,0x7c,0x01,0x7b,0x01,0x7d,
123 0x02,0x7c,0x05,0x85,0x03,0x99,0x02,0x7e,0x02,0x7d,
124 0x02,0x7c,0x01,0x7b,0x00,0x7c,0xff,0x7b,0xfe,0x7c,
125 0xfe,0x7d,0xfe,0x7e,0x02,0x9e,0x02,0x7c,0x01,0x7d,
126 0x01,0x7b,0x00,0x7c,0xff,0x7b,0xff,0x7d,0xfe,0x7c,
127 0x09,0x85,0x08,0x95,0x00,0x74,0xfb,0x89,0x0a,0x7a,
128 0x00,0x86,0xf6,0x7a,0x0d,0xf4,0x0d,0x92,0x00,0x6e,
129 0xf7,0x89,0x12,0x00,0x04,0xf7,0x06,0x81,0xff,0x7f,
130 0xff,0x01,0x01,0x01,0x01,0x7f,0x00,0x7e,0xff,0x7e,
131 0xff,0x7f,0x06,0x84,0x04,0x89,0x12,0x00,0x04,0xf7,
132 0x05,0x82,0xff,0x7f,0x01,0x7f,0x01,0x01,0xff,0x01,
133 0x05,0xfe,0x00,0xfd,0x0e,0x18,0x00,0xeb,0x09,0x95,
134 0xfd,0x7f,0xfe,0x7d,0xff,0x7b,0x00,0x7d,0x01,0x7b,
135 0x02,0x7d,0x03,0x7f,0x02,0x00,0x03,0x01,0x02,0x03,
136 0x01,0x05,0x00,0x03,0xff,0x05,0xfe,0x03,0xfd,0x01,
137 0xfe,0x00,0x0b,0xeb,0x06,0x91,0x02,0x01,0x03,0x03,
138 0x00,0x6b,0x09,0x80,0x04,0x90,0x00,0x01,0x01,0x02,
139 0x01,0x01,0x02,0x01,0x04,0x00,0x02,0x7f,0x01,0x7f,
140 0x01,0x7e,0x00,0x7e,0xff,0x7e,0xfe,0x7d,0xf6,0x76,
141 0x0e,0x00,0x03,0x80,0x05,0x95,0x0b,0x00,0xfa,0x78,
142 0x03,0x00,0x02,0x7f,0x01,0x7f,0x01,0x7d,0x00,0x7e,
143 0xff,0x7d,0xfe,0x7e,0xfd,0x7f,0xfd,0x00,0xfd,0x01,
144 0xff,0x01,0xff,0x02,0x11,0xfc,0x0d,0x95,0xf6,0x72,
145 0x0f,0x00,0xfb,0x8e,0x00,0x6b,0x07,0x80,0x0f,0x95,
146 0xf6,0x00,0xff,0x77,0x01,0x01,0x03,0x01,0x03,0x00,
147 0x03,0x7f,0x02,0x7e,0x01,0x7d,0x00,0x7e,0xff,0x7d,
148 0xfe,0x7e,0xfd,0x7f,0xfd,0x00,0xfd,0x01,0xff,0x01,
149 0xff,0x02,0x11,0xfc,0x10,0x92,0xff,0x02,0xfd,0x01,
150 0xfe,0x00,0xfd,0x7f,0xfe,0x7d,0xff,0x7b,0x00,0x7b,
151 0x01,0x7c,0x02,0x7e,0x03,0x7f,0x01,0x00,0x03,0x01,
152 0x02,0x02,0x01,0x03,0x00,0x01,0xff,0x03,0xfe,0x02,
153 0xfd,0x01,0xff,0x00,0xfd,0x7f,0xfe,0x7e,0xff,0x7d,
154 0x10,0xf9,0x11,0x95,0xf6,0x6b,0xfc,0x95,0x0e,0x00,
155 0x03,0xeb,0x08,0x95,0xfd,0x7f,0xff,0x7e,0x00,0x7e,
156 0x01,0x7e,0x02,0x7f,0x04,0x7f,0x03,0x7f,0x02,0x7e,
157 0x01,0x7e,0x00,0x7d,0xff,0x7e,0xff,0x7f,0xfd,0x7f,
158 0xfc,0x00,0xfd,0x01,0xff,0x01,0xff,0x02,0x00,0x03,
159 0x01,0x02,0x02,0x02,0x03,0x01,0x04,0x01,0x02,0x01,
160 0x01,0x02,0x00,0x02,0xff,0x02,0xfd,0x01,0xfc,0x00,
161 0x0c,0xeb,0x10,0x8e,0xff,0x7d,0xfe,0x7e,0xfd,0x7f,
162 0xff,0x00,0xfd,0x01,0xfe,0x02,0xff,0x03,0x00,0x01,
163 0x01,0x03,0x02,0x02,0x03,0x01,0x01,0x00,0x03,0x7f,
164 0x02,0x7e,0x01,0x7c,0x00,0x7b,0xff,0x7b,0xfe,0x7d,
165 0xfd,0x7f,0xfe,0x00,0xfd,0x01,0xff,0x02,0x10,0xfd,
166 0x05,0x8e,0xff,0x7f,0x01,0x7f,0x01,0x01,0xff,0x01,
167 0x00,0xf4,0xff,0x7f,0x01,0x7f,0x01,0x01,0xff,0x01,
168 0x05,0xfe,0x05,0x8e,0xff,0x7f,0x01,0x7f,0x01,0x01,
169 0xff,0x01,0x01,0xf3,0xff,0x7f,0xff,0x01,0x01,0x01,
170 0x01,0x7f,0x00,0x7e,0xff,0x7e,0xff,0x7f,0x06,0x84,
171 0x14,0x92,0xf0,0x77,0x10,0x77,0x04,0x80,0x04,0x8c,
172 0x12,0x00,0xee,0xfa,0x12,0x00,0x04,0xfa,0x04,0x92,
173 0x10,0x77,0xf0,0x77,0x14,0x80,0x03,0x90,0x00,0x01,
174 0x01,0x02,0x01,0x01,0x02,0x01,0x04,0x00,0x02,0x7f,
175 0x01,0x7f,0x01,0x7e,0x00,0x7e,0xff,0x7e,0xff,0x7f,
176 0xfc,0x7e,0x00,0x7d,0x00,0xfb,0xff,0x7f,0x01,0x7f,
177 0x01,0x01,0xff,0x01,0x09,0xfe,0x12,0x8d,0xff,0x02,
178 0xfe,0x01,0xfd,0x00,0xfe,0x7f,0xff,0x7f,0xff,0x7d,
179 0x00,0x7d,0x01,0x7e,0x02,0x7f,0x03,0x00,0x02,0x01,
180 0x01,0x02,0xfb,0x88,0xfe,0x7e,0xff,0x7d,0x00,0x7d,
181 0x01,0x7e,0x01,0x7f,0x07,0x8b,0xff,0x78,0x00,0x7e,
182 0x02,0x7f,0x02,0x00,0x02,0x02,0x01,0x03,0x00,0x02,
183 0xff,0x03,0xff,0x02,0xfe,0x02,0xfe,0x01,0xfd,0x01,
184 0xfd,0x00,0xfd,0x7f,0xfe,0x7f,0xfe,0x7e,0xff,0x7e,
185 0xff,0x7d,0x00,0x7d,0x01,0x7d,0x01,0x7e,0x02,0x7e,
186 0x02,0x7f,0x03,0x7f,0x03,0x00,0x03,0x01,0x02,0x01,
187 0x01,0x01,0xfe,0x8d,0xff,0x78,0x00,0x7e,0x01,0x7f,
188 0x08,0xfb,0x09,0x95,0xf8,0x6b,0x08,0x95,0x08,0x6b,
189 0xf3,0x87,0x0a,0x00,0x04,0xf9,0x04,0x95,0x00,0x6b,
190 0x00,0x95,0x09,0x00,0x03,0x7f,0x01,0x7f,0x01,0x7e,
191 0x00,0x7e,0xff,0x7e,0xff,0x7f,0xfd,0x7f,0xf7,0x80,
192 0x09,0x00,0x03,0x7f,0x01,0x7f,0x01,0x7e,0x00,0x7d,
193 0xff,0x7e,0xff,0x7f,0xfd,0x7f,0xf7,0x00,0x11,0x80,
194 0x12,0x90,0xff,0x02,0xfe,0x02,0xfe,0x01,0xfc,0x00,
195 0xfe,0x7f,0xfe,0x7e,0xff,0x7e,0xff,0x7d,0x00,0x7b,
196 0x01,0x7d,0x01,0x7e,0x02,0x7e,0x02,0x7f,0x04,0x00,
197 0x02,0x01,0x02,0x02,0x01,0x02,0x03,0xfb,0x04,0x95,
198 0x00,0x6b,0x00,0x95,0x07,0x00,0x03,0x7f,0x02,0x7e,
199 0x01,0x7e,0x01,0x7d,0x00,0x7b,0xff,0x7d,0xff,0x7e,
200 0xfe,0x7e,0xfd,0x7f,0xf9,0x00,0x11,0x80,0x04,0x95,
201 0x00,0x6b,0x00,0x95,0x0d,0x00,0xf3,0xf6,0x08,0x00,
202 0xf8,0xf5,0x0d,0x00,0x02,0x80,0x04,0x95,0x00,0x6b,
203 0x00,0x95,0x0d,0x00,0xf3,0xf6,0x08,0x00,0x06,0xf5,
204 0x12,0x90,0xff,0x02,0xfe,0x02,0xfe,0x01,0xfc,0x00,
205 0xfe,0x7f,0xfe,0x7e,0xff,0x7e,0xff,0x7d,0x00,0x7b,
206 0x01,0x7d,0x01,0x7e,0x02,0x7e,0x02,0x7f,0x04,0x00,
207 0x02,0x01,0x02,0x02,0x01,0x02,0x00,0x03,0xfb,0x80,
208 0x05,0x00,0x03,0xf8,0x04,0x95,0x00,0x6b,0x0e,0x95,
209 0x00,0x6b,0xf2,0x8b,0x0e,0x00,0x04,0xf5,0x04,0x95,
210 0x00,0x6b,0x04,0x80,0x0c,0x95,0x00,0x70,0xff,0x7d,
211 0xff,0x7f,0xfe,0x7f,0xfe,0x00,0xfe,0x01,0xff,0x01,
212 0xff,0x03,0x00,0x02,0x0e,0xf9,0x04,0x95,0x00,0x6b,
213 0x0e,0x95,0xf2,0x72,0x05,0x85,0x09,0x74,0x03,0x80,
214 0x04,0x95,0x00,0x6b,0x00,0x80,0x0c,0x00,0x01,0x80,
215 0x04,0x95,0x00,0x6b,0x00,0x95,0x08,0x6b,0x08,0x95,
216 0xf8,0x6b,0x08,0x95,0x00,0x6b,0x04,0x80,0x04,0x95,
217 0x00,0x6b,0x00,0x95,0x0e,0x6b,0x00,0x95,0x00,0x6b,
218 0x04,0x80,0x09,0x95,0xfe,0x7f,0xfe,0x7e,0xff,0x7e,
219 0xff,0x7d,0x00,0x7b,0x01,0x7d,0x01,0x7e,0x02,0x7e,
220 0x02,0x7f,0x04,0x00,0x02,0x01,0x02,0x02,0x01,0x02,
221 0x01,0x03,0x00,0x05,0xff,0x03,0xff,0x02,0xfe,0x02,
222 0xfe,0x01,0xfc,0x00,0x0d,0xeb,0x04,0x95,0x00,0x6b,
223 0x00,0x95,0x09,0x00,0x03,0x7f,0x01,0x7f,0x01,0x7e,
224 0x00,0x7d,0xff,0x7e,0xff,0x7f,0xfd,0x7f,0xf7,0x00,
225 0x11,0xf6,0x09,0x95,0xfe,0x7f,0xfe,0x7e,0xff,0x7e,
226 0xff,0x7d,0x00,0x7b,0x01,0x7d,0x01,0x7e,0x02,0x7e,
227 0x02,0x7f,0x04,0x00,0x02,0x01,0x02,0x02,0x01,0x02,
228 0x01,0x03,0x00,0x05,0xff,0x03,0xff,0x02,0xfe,0x02,
229 0xfe,0x01,0xfc,0x00,0x03,0xef,0x06,0x7a,0x04,0x82,
230 0x04,0x95,0x00,0x6b,0x00,0x95,0x09,0x00,0x03,0x7f,
231 0x01,0x7f,0x01,0x7e,0x00,0x7e,0xff,0x7e,0xff,0x7f,
232 0xfd,0x7f,0xf7,0x00,0x07,0x80,0x07,0x75,0x03,0x80,
233 0x11,0x92,0xfe,0x02,0xfd,0x01,0xfc,0x00,0xfd,0x7f,
234 0xfe,0x7e,0x00,0x7e,0x01,0x7e,0x01,0x7f,0x02,0x7f,
235 0x06,0x7e,0x02,0x7f,0x01,0x7f,0x01,0x7e,0x00,0x7d,
236 0xfe,0x7e,0xfd,0x7f,0xfc,0x00,0xfd,0x01,0xfe,0x02,
237 0x11,0xfd,0x08,0x95,0x00,0x6b,0xf9,0x95,0x0e,0x00,
238 0x01,0xeb,0x04,0x95,0x00,0x71,0x01,0x7d,0x02,0x7e,
239 0x03,0x7f,0x02,0x00,0x03,0x01,0x02,0x02,0x01,0x03,
240 0x00,0x0f,0x04,0xeb,0x01,0x95,0x08,0x6b,0x08,0x95,
241 0xf8,0x6b,0x09,0x80,0x02,0x95,0x05,0x6b,0x05,0x95,
242 0xfb,0x6b,0x05,0x95,0x05,0x6b,0x05,0x95,0xfb,0x6b,
243 0x07,0x80,0x03,0x95,0x0e,0x6b,0x00,0x95,0xf2,0x6b,
244 0x11,0x80,0x01,0x95,0x08,0x76,0x00,0x75,0x08,0x95,
245 0xf8,0x76,0x09,0xf5,0x11,0x95,0xf2,0x6b,0x00,0x95,
246 0x0e,0x00,0xf2,0xeb,0x0e,0x00,0x03,0x80,0x03,0x93,
247 0x00,0x6c,0x01,0x94,0x00,0x6c,0xff,0x94,0x05,0x00,
248 0xfb,0xec,0x05,0x00,0x02,0x81,0x00,0x95,0x0e,0x68,
249 0x00,0x83,0x06,0x93,0x00,0x6c,0x01,0x94,0x00,0x6c,
250 0xfb,0x94,0x05,0x00,0xfb,0xec,0x05,0x00,0x03,0x81,
251 0x03,0x87,0x08,0x05,0x08,0x7b,0xf0,0x80,0x08,0x04,
252 0x08,0x7c,0x03,0xf9,0x01,0x80,0x10,0x00,0x01,0x80,
253 0x06,0x95,0xff,0x7f,0xff,0x7e,0x00,0x7e,0x01,0x7f,
254 0x01,0x01,0xff,0x01,0x05,0xef,0x0f,0x8e,0x00,0x72,
255 0x00,0x8b,0xfe,0x02,0xfe,0x01,0xfd,0x00,0xfe,0x7f,
256 0xfe,0x7e,0xff,0x7d,0x00,0x7e,0x01,0x7d,0x02,0x7e,
257 0x02,0x7f,0x03,0x00,0x02,0x01,0x02,0x02,0x04,0xfd,
258 0x04,0x95,0x00,0x6b,0x00,0x8b,0x02,0x02,0x02,0x01,
259 0x03,0x00,0x02,0x7f,0x02,0x7e,0x01,0x7d,0x00,0x7e,
260 0xff,0x7d,0xfe,0x7e,0xfe,0x7f,0xfd,0x00,0xfe,0x01,
261 0xfe,0x02,0x0f,0xfd,0x0f,0x8b,0xfe,0x02,0xfe,0x01,
262 0xfd,0x00,0xfe,0x7f,0xfe,0x7e,0xff,0x7d,0x00,0x7e,
263 0x01,0x7d,0x02,0x7e,0x02,0x7f,0x03,0x00,0x02,0x01,
264 0x02,0x02,0x03,0xfd,0x0f,0x95,0x00,0x6b,0x00,0x8b,
265 0xfe,0x02,0xfe,0x01,0xfd,0x00,0xfe,0x7f,0xfe,0x7e,
266 0xff,0x7d,0x00,0x7e,0x01,0x7d,0x02,0x7e,0x02,0x7f,
267 0x03,0x00,0x02,0x01,0x02,0x02,0x04,0xfd,0x03,0x88,
268 0x0c,0x00,0x00,0x02,0xff,0x02,0xff,0x01,0xfe,0x01,
269 0xfd,0x00,0xfe,0x7f,0xfe,0x7e,0xff,0x7d,0x00,0x7e,
270 0x01,0x7d,0x02,0x7e,0x02,0x7f,0x03,0x00,0x02,0x01,
271 0x02,0x02,0x03,0xfd,0x0a,0x95,0xfe,0x00,0xfe,0x7f,
272 0xff,0x7d,0x00,0x6f,0xfd,0x8e,0x07,0x00,0x03,0xf2,
273 0x0f,0x8e,0x00,0x70,0xff,0x7d,0xff,0x7f,0xfe,0x7f,
274 0xfd,0x00,0xfe,0x01,0x09,0x91,0xfe,0x02,0xfe,0x01,
275 0xfd,0x00,0xfe,0x7f,0xfe,0x7e,0xff,0x7d,0x00,0x7e,
276 0x01,0x7d,0x02,0x7e,0x02,0x7f,0x03,0x00,0x02,0x01,
277 0x02,0x02,0x04,0xfd,0x04,0x95,0x00,0x6b,0x00,0x8a,
278 0x03,0x03,0x02,0x01,0x03,0x00,0x02,0x7f,0x01,0x7d,
279 0x00,0x76,0x04,0x80,0x03,0x95,0x01,0x7f,0x01,0x01,
280 0xff,0x01,0xff,0x7f,0x01,0xf9,0x00,0x72,0x04,0x80,
281 0x05,0x95,0x01,0x7f,0x01,0x01,0xff,0x01,0xff,0x7f,
282 0x01,0xf9,0x00,0x6f,0xff,0x7d,0xfe,0x7f,0xfe,0x00,
283 0x09,0x87,0x04,0x95,0x00,0x6b,0x0a,0x8e,0xf6,0x76,
284 0x04,0x84,0x07,0x78,0x02,0x80,0x04,0x95,0x00,0x6b,
285 0x04,0x80,0x04,0x8e,0x00,0x72,0x00,0x8a,0x03,0x03,
286 0x02,0x01,0x03,0x00,0x02,0x7f,0x01,0x7d,0x00,0x76,
287 0x00,0x8a,0x03,0x03,0x02,0x01,0x03,0x00,0x02,0x7f,
288 0x01,0x7d,0x00,0x76,0x04,0x80,0x04,0x8e,0x00,0x72,
289 0x00,0x8a,0x03,0x03,0x02,0x01,0x03,0x00,0x02,0x7f,
290 0x01,0x7d,0x00,0x76,0x04,0x80,0x08,0x8e,0xfe,0x7f,
291 0xfe,0x7e,0xff,0x7d,0x00,0x7e,0x01,0x7d,0x02,0x7e,
292 0x02,0x7f,0x03,0x00,0x02,0x01,0x02,0x02,0x01,0x03,
293 0x00,0x02,0xff,0x03,0xfe,0x02,0xfe,0x01,0xfd,0x00,
294 0x0b,0xf2,0x04,0x8e,0x00,0x6b,0x00,0x92,0x02,0x02,
295 0x02,0x01,0x03,0x00,0x02,0x7f,0x02,0x7e,0x01,0x7d,
296 0x00,0x7e,0xff,0x7d,0xfe,0x7e,0xfe,0x7f,0xfd,0x00,
297 0xfe,0x01,0xfe,0x02,0x0f,0xfd,0x0f,0x8e,0x00,0x6b,
298 0x00,0x92,0xfe,0x02,0xfe,0x01,0xfd,0x00,0xfe,0x7f,
299 0xfe,0x7e,0xff,0x7d,0x00,0x7e,0x01,0x7d,0x02,0x7e,
300 0x02,0x7f,0x03,0x00,0x02,0x01,0x02,0x02,0x04,0xfd,
301 0x04,0x8e,0x00,0x72,0x00,0x88,0x01,0x03,0x02,0x02,
302 0x02,0x01,0x03,0x00,0x01,0xf2,0x0e,0x8b,0xff,0x02,
303 0xfd,0x01,0xfd,0x00,0xfd,0x7f,0xff,0x7e,0x01,0x7e,
304 0x02,0x7f,0x05,0x7f,0x02,0x7f,0x01,0x7e,0x00,0x7f,
305 0xff,0x7e,0xfd,0x7f,0xfd,0x00,0xfd,0x01,0xff,0x02,
306 0x0e,0xfd,0x05,0x95,0x00,0x6f,0x01,0x7d,0x02,0x7f,
307 0x02,0x00,0xf8,0x8e,0x07,0x00,0x03,0xf2,0x04,0x8e,
308 0x00,0x76,0x01,0x7d,0x02,0x7f,0x03,0x00,0x02,0x01,
309 0x03,0x03,0x00,0x8a,0x00,0x72,0x04,0x80,0x02,0x8e,
310 0x06,0x72,0x06,0x8e,0xfa,0x72,0x08,0x80,0x03,0x8e,
311 0x04,0x72,0x04,0x8e,0xfc,0x72,0x04,0x8e,0x04,0x72,
312 0x04,0x8e,0xfc,0x72,0x07,0x80,0x03,0x8e,0x0b,0x72,
313 0x00,0x8e,0xf5,0x72,0x0e,0x80,0x02,0x8e,0x06,0x72,
314 0x06,0x8e,0xfa,0x72,0xfe,0x7c,0xfe,0x7e,0xfe,0x7f,
315 0xff,0x00,0x0f,0x87,0x0e,0x8e,0xf5,0x72,0x00,0x8e,
316 0x0b,0x00,0xf5,0xf2,0x0b,0x00,0x03,0x80,0x09,0x99,
317 0xfe,0x7f,0xff,0x7f,0xff,0x7e,0x00,0x7e,0x01,0x7e,
318 0x01,0x7f,0x01,0x7e,0x00,0x7e,0xfe,0x7e,0x01,0x8e,
319 0xff,0x7e,0x00,0x7e,0x01,0x7e,0x01,0x7f,0x01,0x7e,
320 0x00,0x7e,0xff,0x7e,0xfc,0x7e,0x04,0x7e,0x01,0x7e,
321 0x00,0x7e,0xff,0x7e,0xff,0x7f,0xff,0x7e,0x00,0x7e,
322 0x01,0x7e,0xff,0x8e,0x02,0x7e,0x00,0x7e,0xff,0x7e,
323 0xff,0x7f,0xff,0x7e,0x00,0x7e,0x01,0x7e,0x01,0x7f,
324 0x02,0x7f,0x05,0x87,0x04,0x95,0x00,0x77,0x00,0xfd,
325 0x00,0x77,0x04,0x80,0x05,0x99,0x02,0x7f,0x01,0x7f,
326 0x01,0x7e,0x00,0x7e,0xff,0x7e,0xff,0x7f,0xff,0x7e,
327 0x00,0x7e,0x02,0x7e,0xff,0x8e,0x01,0x7e,0x00,0x7e,
328 0xff,0x7e,0xff,0x7f,0xff,0x7e,0x00,0x7e,0x01,0x7e,
329 0x04,0x7e,0xfc,0x7e,0xff,0x7e,0x00,0x7e,0x01,0x7e,
330 0x01,0x7f,0x01,0x7e,0x00,0x7e,0xff,0x7e,0x01,0x8e,
331 0xfe,0x7e,0x00,0x7e,0x01,0x7e,0x01,0x7f,0x01,0x7e,
332 0x00,0x7e,0xff,0x7e,0xff,0x7f,0xfe,0x7f,0x09,0x87,
333 0x03,0x86,0x00,0x02,0x01,0x03,0x02,0x01,0x02,0x00,
334 0x02,0x7f,0x04,0x7d,0x02,0x7f,0x02,0x00,0x02,0x01,
335 0x01,0x02,0xee,0xfe,0x01,0x02,0x02,0x01,0x02,0x00,
336 0x02,0x7f,0x04,0x7d,0x02,0x7f,0x02,0x00,0x02,0x01,
337 0x01,0x03,0x00,0x02,0x03,0xf4,0x10,0x80,0x03,0x80,
338 0x07,0x15,0x08,0x6b,0xfe,0x85,0xf5,0x00,0x10,0xfb,
339 0x0d,0x95,0xf6,0x00,0x00,0x6b,0x0a,0x00,0x02,0x02,
340 0x00,0x08,0xfe,0x02,0xf6,0x00,0x0e,0xf4,0x03,0x80,
341 0x00,0x15,0x0a,0x00,0x02,0x7e,0x00,0x7e,0x00,0x7d,
342 0x00,0x7e,0xfe,0x7f,0xf6,0x00,0x0a,0x80,0x02,0x7e,
343 0x01,0x7e,0x00,0x7d,0xff,0x7d,0xfe,0x7f,0xf6,0x00,
344 0x10,0x80,0x03,0x80,0x00,0x15,0x0c,0x00,0xff,0x7e,
345 0x03,0xed,0x03,0xfd,0x00,0x03,0x02,0x00,0x00,0x12,
346 0x02,0x03,0x0a,0x00,0x00,0x6b,0x02,0x00,0x00,0x7d,
347 0xfe,0x83,0xf4,0x00,0x11,0x80,0x0f,0x80,0xf4,0x00,
348 0x00,0x15,0x0c,0x00,0xff,0xf6,0xf5,0x00,0x0f,0xf5,
349 0x04,0x95,0x07,0x76,0x00,0x0a,0x07,0x80,0xf9,0x76,
350 0x00,0x75,0xf8,0x80,0x07,0x0c,0x09,0xf4,0xf9,0x0c,
351 0x09,0xf4,0x03,0x92,0x02,0x03,0x07,0x00,0x03,0x7d,
352 0x00,0x7b,0xfc,0x7e,0x04,0x7d,0x00,0x7a,0xfd,0x7e,
353 0xf9,0x00,0xfe,0x02,0x06,0x89,0x02,0x00,0x06,0xf5,
354 0x03,0x95,0x00,0x6b,0x0c,0x15,0x00,0x6b,0x02,0x80,
355 0x03,0x95,0x00,0x6b,0x0c,0x15,0x00,0x6b,0xf8,0x96,
356 0x03,0x00,0x07,0xea,0x03,0x80,0x00,0x15,0x0c,0x80,
357 0xf7,0x76,0xfd,0x00,0x03,0x80,0x0a,0x75,0x03,0x80,
358 0x03,0x80,0x07,0x13,0x02,0x02,0x03,0x00,0x00,0x6b,
359 0x02,0x80,0x03,0x80,0x00,0x15,0x09,0x6b,0x09,0x15,
360 0x00,0x6b,0x03,0x80,0x03,0x80,0x00,0x15,0x00,0xf6,
361 0x0d,0x00,0x00,0x8a,0x00,0x6b,0x03,0x80,0x07,0x80,
362 0xfd,0x00,0xff,0x03,0x00,0x04,0x00,0x07,0x00,0x04,
363 0x01,0x02,0x03,0x01,0x06,0x00,0x03,0x7f,0x01,0x7e,
364 0x01,0x7c,0x00,0x79,0xff,0x7c,0xff,0x7d,0xfd,0x00,
365 0xfa,0x00,0x0e,0x80,0x03,0x80,0x00,0x15,0x0c,0x00,
366 0x00,0x6b,0x02,0x80,0x03,0x80,0x00,0x15,0x0a,0x00,
367 0x02,0x7f,0x01,0x7d,0x00,0x7b,0xff,0x7e,0xfe,0x7f,
368 0xf6,0x00,0x10,0xf7,0x11,0x8f,0xff,0x03,0xff,0x02,
369 0xfe,0x01,0xfa,0x00,0xfd,0x7f,0xff,0x7e,0x00,0x7c,
370 0x00,0x79,0x00,0x7b,0x01,0x7e,0x03,0x00,0x06,0x00,
371 0x02,0x00,0x01,0x03,0x01,0x02,0x03,0xfb,0x03,0x95,
372 0x0c,0x00,0xfa,0x80,0x00,0x6b,0x09,0x80,0x03,0x95,
373 0x00,0x77,0x06,0x7a,0x06,0x06,0x00,0x09,0xfa,0xf1,
374 0xfa,0x7a,0x0e,0x80,0x03,0x87,0x00,0x0b,0x02,0x02,
375 0x03,0x00,0x02,0x7e,0x01,0x02,0x04,0x00,0x02,0x7e,
376 0x00,0x75,0xfe,0x7e,0xfc,0x00,0xff,0x01,0xfe,0x7f,
377 0xfd,0x00,0xfe,0x02,0x07,0x8e,0x00,0x6b,0x09,0x80,
378 0x03,0x80,0x0e,0x15,0xf2,0x80,0x0e,0x6b,0x03,0x80,
379 0x03,0x95,0x00,0x6b,0x0e,0x00,0x00,0x7d,0xfe,0x98,
380 0x00,0x6b,0x05,0x80,0x03,0x95,0x00,0x75,0x02,0x7d,
381 0x0a,0x00,0x00,0x8e,0x00,0x6b,0x02,0x80,0x03,0x95,
382 0x00,0x6b,0x10,0x00,0x00,0x15,0xf8,0x80,0x00,0x6b,
383 0x0a,0x80,0x03,0x95,0x00,0x6b,0x10,0x00,0x00,0x15,
384 0xf8,0x80,0x00,0x6b,0x0a,0x00,0x00,0x7d,0x02,0x83,
385 0x10,0x80,0x03,0x95,0x00,0x6b,0x09,0x00,0x03,0x02,
386 0x00,0x08,0xfd,0x02,0xf7,0x00,0x0e,0x89,0x00,0x6b,
387 0x03,0x80,0x03,0x95,0x00,0x6b,0x09,0x00,0x03,0x02,
388 0x00,0x08,0xfd,0x02,0xf7,0x00,0x0e,0xf4,0x03,0x92,
389 0x02,0x03,0x07,0x00,0x03,0x7d,0x00,0x70,0xfd,0x7e,
390 0xf9,0x00,0xfe,0x02,0x03,0x89,0x09,0x00,0x02,0xf5,
391 0x03,0x80,0x00,0x15,0x00,0xf5,0x07,0x00,0x00,0x08,
392 0x02,0x03,0x06,0x00,0x02,0x7d,0x00,0x70,0xfe,0x7e,
393 0xfa,0x00,0xfe,0x02,0x00,0x08,0x0c,0xf6,0x0f,0x80,
394 0x00,0x15,0xf6,0x00,0xfe,0x7d,0x00,0x79,0x02,0x7e,
395 0x0a,0x00,0xf4,0xf7,0x07,0x09,0x07,0xf7,0x03,0x8c,
396 0x01,0x02,0x01,0x01,0x05,0x00,0x02,0x7f,0x01,0x7e,
397 0x00,0x74,0x00,0x86,0xff,0x01,0xfe,0x01,0xfb,0x00,
398 0xff,0x7f,0xff,0x7f,0x00,0x7c,0x01,0x7e,0x01,0x00,
399 0x05,0x00,0x02,0x00,0x01,0x02,0x03,0xfe,0x04,0x8e,
400 0x02,0x01,0x04,0x00,0x02,0x7f,0x01,0x7e,0x00,0x77,
401 0xff,0x7e,0xfe,0x7f,0xfc,0x00,0xfe,0x01,0xff,0x02,
402 0x00,0x09,0x01,0x02,0x02,0x02,0x03,0x01,0x02,0x01,
403 0x01,0x01,0x01,0x02,0x02,0xeb,0x03,0x80,0x00,0x15,
404 0x03,0x00,0x02,0x7e,0x00,0x7b,0xfe,0x7e,0xfd,0x00,
405 0x03,0x80,0x04,0x00,0x03,0x7e,0x00,0x78,0xfd,0x7e,
406 0xf9,0x00,0x0c,0x80,0x03,0x8c,0x02,0x02,0x02,0x01,
407 0x03,0x00,0x02,0x7f,0x01,0x7d,0xfe,0x7e,0xf9,0x7d,
408 0xff,0x7e,0x00,0x7d,0x03,0x7f,0x02,0x00,0x03,0x01,
409 0x02,0x01,0x02,0xfe,0x0d,0x8c,0xff,0x02,0xfe,0x01,
410 0xfc,0x00,0xfe,0x7f,0xff,0x7e,0x00,0x77,0x01,0x7e,
411 0x02,0x7f,0x04,0x00,0x02,0x01,0x01,0x02,0x00,0x0f,
412 0xff,0x02,0xfe,0x01,0xf9,0x00,0x0c,0xeb,0x03,0x88,
413 0x0a,0x00,0x00,0x02,0x00,0x03,0xfe,0x02,0xfa,0x00,
414 0xff,0x7e,0xff,0x7d,0x00,0x7b,0x01,0x7c,0x01,0x7f,
415 0x06,0x00,0x02,0x02,0x03,0xfe,0x03,0x8f,0x06,0x77,
416 0x06,0x09,0xfa,0x80,0x00,0x71,0xff,0x87,0xfb,0x79,
417 0x07,0x87,0x05,0x79,0x02,0x80,0x03,0x8d,0x02,0x02,
418 0x06,0x00,0x02,0x7e,0x00,0x7d,0xfc,0x7d,0x04,0x7e,
419 0x00,0x7d,0xfe,0x7e,0xfa,0x00,0xfe,0x02,0x04,0x85,
420 0x02,0x00,0x06,0xf9,0x03,0x8f,0x00,0x73,0x01,0x7e,
421 0x07,0x00,0x02,0x02,0x00,0x0d,0x00,0xf3,0x01,0x7e,
422 0x03,0x80,0x03,0x8f,0x00,0x73,0x01,0x7e,0x07,0x00,
423 0x02,0x02,0x00,0x0d,0x00,0xf3,0x01,0x7e,0xf8,0x90,
424 0x03,0x00,0x08,0xf0,0x03,0x80,0x00,0x15,0x00,0xf3,
425 0x02,0x00,0x06,0x07,0xfa,0xf9,0x07,0x78,0x03,0x80,
426 0x03,0x80,0x04,0x0c,0x02,0x03,0x04,0x00,0x00,0x71,
427 0x02,0x80,0x03,0x80,0x00,0x0f,0x06,0x77,0x06,0x09,
428 0x00,0x71,0x02,0x80,0x03,0x80,0x00,0x0f,0x0a,0xf1,
429 0x00,0x0f,0xf6,0xf8,0x0a,0x00,0x02,0xf9,0x05,0x80,
430 0xff,0x01,0xff,0x04,0x00,0x05,0x01,0x03,0x01,0x02,
431 0x06,0x00,0x02,0x7e,0x00,0x7d,0x00,0x7b,0x00,0x7c,
432 0xfe,0x7f,0xfa,0x00,0x0b,0x80,0x03,0x80,0x00,0x0f,
433 0x00,0xfb,0x01,0x03,0x01,0x02,0x05,0x00,0x02,0x7e,
434 0x01,0x7d,0x00,0x76,0x03,0x80,0x10,0x80,0x10,0x80,
435 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
436 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
437 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
438 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
439 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
440 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
441 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
442 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
443 0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80,
444 0x10,0x80,0x0a,0x8f,0x02,0x7f,0x01,0x7e,0x00,0x76,
445 0xff,0x7f,0xfe,0x7f,0xfb,0x00,0xff,0x01,0xff,0x01,
446 0x00,0x0a,0x01,0x02,0x01,0x01,0x05,0x00,0xf9,0x80,
447 0x00,0x6b,0x0c,0x86,0x0d,0x8a,0xff,0x03,0xfe,0x02,
448 0xfb,0x00,0xff,0x7e,0xff,0x7d,0x00,0x7b,0x01,0x7c,
449 0x01,0x7f,0x05,0x00,0x02,0x01,0x01,0x03,0x03,0xfc,
450 0x03,0x80,0x00,0x0f,0x00,0xfb,0x01,0x03,0x01,0x02,
451 0x04,0x00,0x01,0x7e,0x01,0x7d,0x00,0x76,0x00,0x8a,
452 0x01,0x03,0x02,0x02,0x03,0x00,0x02,0x7e,0x01,0x7d,
453 0x00,0x76,0x03,0x80,0x03,0x8f,0x00,0x74,0x01,0x7e,
454 0x02,0x7f,0x04,0x00,0x02,0x01,0x01,0x01,0x00,0x8d,
455 0x00,0x6e,0xff,0x7e,0xfe,0x7f,0xfb,0x00,0xfe,0x01,
456 0x0c,0x85,0x03,0x8d,0x01,0x02,0x03,0x00,0x02,0x7e,
457 0x01,0x02,0x03,0x00,0x02,0x7e,0x00,0x74,0xfe,0x7f,
458 0xfd,0x00,0xff,0x01,0xfe,0x7f,0xfd,0x00,0xff,0x01,
459 0x00,0x0c,0x06,0x82,0x00,0x6b,0x08,0x86,0x03,0x80,
460 0x0a,0x0f,0xf6,0x80,0x0a,0x71,0x03,0x80,0x03,0x8f,
461 0x00,0x73,0x01,0x7e,0x07,0x00,0x02,0x02,0x00,0x0d,
462 0x00,0xf3,0x01,0x7e,0x00,0x7e,0x03,0x82,0x03,0x8f,
463 0x00,0x79,0x02,0x7e,0x08,0x00,0x00,0x89,0x00,0x71,
464 0x02,0x80,0x03,0x8f,0x00,0x73,0x01,0x7e,0x03,0x00,
465 0x02,0x02,0x00,0x0d,0x00,0xf3,0x01,0x7e,0x03,0x00,
466 0x02,0x02,0x00,0x0d,0x00,0xf3,0x01,0x7e,0x03,0x80,
467 0x03,0x8f,0x00,0x73,0x01,0x7e,0x03,0x00,0x02,0x02,
468 0x00,0x0d,0x00,0xf3,0x01,0x7e,0x03,0x00,0x02,0x02,
469 0x00,0x0d,0x00,0xf3,0x01,0x7e,0x00,0x7e,0x03,0x82,
470 0x03,0x8d,0x00,0x02,0x02,0x00,0x00,0x71,0x08,0x00,
471 0x02,0x02,0x00,0x06,0xfe,0x02,0xf8,0x00,0x0c,0xf6,
472 0x03,0x8f,0x00,0x71,0x07,0x00,0x02,0x02,0x00,0x06,
473 0xfe,0x02,0xf9,0x00,0x0c,0x85,0x00,0x71,0x02,0x80,
474 0x03,0x8f,0x00,0x71,0x07,0x00,0x03,0x02,0x00,0x06,
475 0xfd,0x02,0xf9,0x00,0x0c,0xf6,0x03,0x8d,0x02,0x02,
476 0x06,0x00,0x02,0x7e,0x00,0x75,0xfe,0x7e,0xfa,0x00,
477 0xfe,0x02,0x04,0x85,0x06,0x00,0x02,0xf9,0x03,0x80,
478 0x00,0x0f,0x00,0xf8,0x04,0x00,0x00,0x06,0x02,0x02,
479 0x04,0x00,0x02,0x7e,0x00,0x75,0xfe,0x7e,0xfc,0x00,
480 0xfe,0x02,0x00,0x05,0x0a,0xf9,0x0d,0x80,0x00,0x0f,
481 0xf7,0x00,0xff,0x7e,0x00,0x7b,0x01,0x7e,0x09,0x00,
482 0xf6,0xfa,0x04,0x06,0x08,0xfa
483 };
484
485 //-------------------------------------------------------------------------
486 gsv_text::gsv_text() :
487 m_x(0.0),
488 m_y(0.0),
489 m_start_x(0.0),
490 m_width(10.0),
491 m_height(0.0),
492 m_space(0.0),
493 m_line_space(0.0),
494 m_text(m_chr),
495 m_text_buf(),
496 m_cur_chr(m_chr),
497 m_font(gsv_default_font),
498 m_loaded_font(),
499 m_status(initial),
500 m_big_endian(false),
501 m_flip(false)
502 {
503 m_chr[0] = m_chr[1] = 0;
504
505 int t = 1;
506 if(*(char*)&t == 0) m_big_endian = true;
507 }
508
509 //-------------------------------------------------------------------------
510 void gsv_text::font(const void* font)
511 {
512 m_font = font;
513 if(m_font == 0) m_font = &m_loaded_font[0];
514 }
515
516 //-------------------------------------------------------------------------
517 void gsv_text::size(double height, double width)
518 {
519 m_height = height;
520 m_width = width;
521 }
522
523 //-------------------------------------------------------------------------
524 void gsv_text::space(double space)
525 {
526 m_space = space;
527 }
528
529 //-------------------------------------------------------------------------
530 void gsv_text::line_space(double line_space)
531 {
532 m_line_space = line_space;
533 }
534
535 //-------------------------------------------------------------------------
536 void gsv_text::start_point(double x, double y)
537 {
538 m_x = m_start_x = x;
539 m_y = y;
540 //if(m_flip) m_y += m_height;
541 }
542
543 //-------------------------------------------------------------------------
544 void gsv_text::load_font(const char* file)
545 {
546 m_loaded_font.resize(0);
547 FILE* fd = fopen(file, "rb");
548 if(fd)
549 {
550 unsigned len;
551
552 fseek(fd, 0l, SEEK_END);
553 len = ftell(fd);
554 fseek(fd, 0l, SEEK_SET);
555 if(len > 0)
556 {
557 m_loaded_font.resize(len);
558 fread(&m_loaded_font[0], 1, len, fd);
559 m_font = &m_loaded_font[0];
560 }
561 fclose(fd);
562 }
563 }
564
565 //-------------------------------------------------------------------------
566 void gsv_text::text(const char* text)
567 {
568 if(text == 0)
569 {
570 m_chr[0] = 0;
571 m_text = m_chr;
572 return;
573 }
574 unsigned new_size = strlen(text) + 1;
575 if(new_size > m_text_buf.size())
576 {
577 m_text_buf.resize(new_size);
578 }
579 memcpy(&m_text_buf[0], text, new_size);
580 m_text = &m_text_buf[0];
581 }
582
583 //-------------------------------------------------------------------------
584 void gsv_text::rewind(unsigned)
585 {
586 m_status = initial;
587 if(m_font == 0) return;
588
589 m_indices = (int8u*)m_font;
590 double base_height = value(m_indices + 4);
591 m_indices += value(m_indices);
592 m_glyphs = (int8*)(m_indices + 257*2);
593 m_h = m_height / base_height;
594 m_w = (m_width == 0.0) ? m_h : m_width / base_height;
595 if(m_flip) m_h = -m_h;
596 m_cur_chr = m_text;
597 }
598
599 //-------------------------------------------------------------------------
600 unsigned gsv_text::vertex(double* x, double* y)
601 {
602 unsigned idx;
603 int8 yc, yf;
604 int dx, dy;
605 bool quit = false;
606
607 while(!quit)
608 {
609 switch(m_status)
610 {
611 case initial:
612 if(m_font == 0)
613 {
614 quit = true;
615 break;
616 }
617 m_status = next_char;
618
619 case next_char:
620 if(*m_cur_chr == 0)
621 {
622 quit = true;
623 break;
624 }
625 idx = (*m_cur_chr++) & 0xFF;
626 if(idx == '\n')
627 {
628 m_x = m_start_x;
629 m_y -= m_flip ? -m_height - m_line_space : m_height + m_line_space;
630 break;
631 }
632 idx <<= 1;
633 m_bglyph = m_glyphs + value(m_indices + idx);
634 m_eglyph = m_glyphs + value(m_indices + idx + 2);
635 m_status = start_glyph;
636
637 case start_glyph:
638 *x = m_x;
639 *y = m_y;
640 m_status = glyph;
641 return path_cmd_move_to;
642
643 case glyph:
644 if(m_bglyph >= m_eglyph)
645 {
646 m_status = next_char;
647 m_x += m_space;
648 break;
649 }
650 dx = int(*m_bglyph++);
651 yf = (yc = *m_bglyph++) & 0x80;
652 yc <<= 1;
653 yc >>= 1;
654 dy = int(yc);
655 m_x += double(dx) * m_w;
656 m_y += double(dy) * m_h;
657 *x = m_x;
658 *y = m_y;
659 return yf ? path_cmd_move_to : path_cmd_line_to;
660 }
661
662 }
663 return path_cmd_stop;
664 }
665
666 //-------------------------------------------------------------------------
667 double gsv_text::text_width()
668 {
669 double x1, y1, x2, y2;
670 bounding_rect_single(*this, 0, &x1, &y1, &x2, &y2);
671 return x2 - x1;
672 }
673
674
675 }