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