g4tools  5.4.0
Static Public Member Functions | List of all members
tools::hershey Class Reference

Static Public Member Functions

static unsigned int max_poly ()
 
static unsigned int max_point ()
 
static void special_char_points (char a_char, float a_scale, int &a_number, int *a_mx_point, float *aX, float *aY, float &a_width)
 
static void latin_char_points (char a_char, float a_scale, int &a_number, int *a_mx_point, float *aX, float *aY, float &a_width)
 
static void greek_char_points (char a_char, float a_scale, int &a_number, int *a_mx_point, float *aX, float *aY, float &a_width)
 

Detailed Description

Definition at line 13 of file hershey.

Member Function Documentation

◆ greek_char_points()

static void tools::hershey::greek_char_points ( char  a_char,
float  a_scale,
int &  a_number,
int *  a_mx_point,
float *  aX,
float *  aY,
float &  a_width 
)
inlinestatic

Definition at line 161 of file hershey.

163  {
164  switch(a_char) {
165  case 'A':extract(H_GREEK,H_UPPER,'A',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
166  case 'B':extract(H_GREEK,H_UPPER,'B',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
167  case 'C':extract(H_GREEK,H_UPPER,'C',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
168  case 'D':extract(H_GREEK,H_UPPER,'D',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
169  case 'E':extract(H_GREEK,H_UPPER,'E',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
170  case 'F':extract(H_GREEK,H_UPPER,'F',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
171  case 'G':extract(H_GREEK,H_UPPER,'G',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
172  case 'H':extract(H_GREEK,H_UPPER,'H',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
173  case 'I':extract(H_GREEK,H_UPPER,'I',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
174  case 'J':extract(H_GREEK,H_UPPER,'J',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
175  case 'K':extract(H_GREEK,H_UPPER,'K',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
176  case 'L':extract(H_GREEK,H_UPPER,'L',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
177  case 'M':extract(H_GREEK,H_UPPER,'M',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
178  case 'N':extract(H_GREEK,H_UPPER,'N',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
179  case 'O':extract(H_GREEK,H_UPPER,'O',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
180  case 'P':extract(H_GREEK,H_UPPER,'P',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
181  case 'Q':extract(H_GREEK,H_UPPER,'Q',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
182  case 'R':extract(H_GREEK,H_UPPER,'R',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
183  case 'S':extract(H_GREEK,H_UPPER,'S',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
184  case 'T':extract(H_GREEK,H_UPPER,'T',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
185  case 'U':extract(H_GREEK,H_UPPER,'U',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
186  case 'V':extract(H_GREEK,H_UPPER,'V',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
187  case 'W':extract(H_GREEK,H_UPPER,'W',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
188  case 'X':extract(H_GREEK,H_UPPER,'X',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
189  case 'Y':extract(H_GREEK,H_UPPER,'Y',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
190  case 'Z':extract(H_GREEK,H_UPPER,'Z',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
191 
192  case 'a':extract(H_GREEK,H_LOWER,'A',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
193  case 'b':extract(H_GREEK,H_LOWER,'B',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
194  case 'c':extract(H_GREEK,H_LOWER,'C',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
195  case 'd':extract(H_GREEK,H_LOWER,'D',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
196  case 'e':extract(H_GREEK,H_LOWER,'E',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
197  case 'f':extract(H_GREEK,H_LOWER,'F',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
198  case 'g':extract(H_GREEK,H_LOWER,'G',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
199  case 'h':extract(H_GREEK,H_LOWER,'H',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
200  case 'i':extract(H_GREEK,H_LOWER,'I',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
201  case 'j':extract(H_GREEK,H_LOWER,'J',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
202  case 'k':extract(H_GREEK,H_LOWER,'K',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
203  case 'l':extract(H_GREEK,H_LOWER,'L',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
204  case 'm':extract(H_GREEK,H_LOWER,'M',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
205  case 'n':extract(H_GREEK,H_LOWER,'N',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
206  case 'o':extract(H_GREEK,H_LOWER,'O',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
207  case 'p':extract(H_GREEK,H_LOWER,'P',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
208  case 'q':extract(H_GREEK,H_LOWER,'Q',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
209  case 'r':extract(H_GREEK,H_LOWER,'R',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
210  case 's':extract(H_GREEK,H_LOWER,'S',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
211  case 't':extract(H_GREEK,H_LOWER,'T',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
212  case 'u':extract(H_GREEK,H_LOWER,'U',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
213  case 'v':extract(H_GREEK,H_LOWER,'V',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
214  case 'w':extract(H_GREEK,H_LOWER,'W',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
215  case 'x':extract(H_GREEK,H_LOWER,'X',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
216  case 'y':extract(H_GREEK,H_LOWER,'Y',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
217  case 'z':extract(H_GREEK,H_LOWER,'Z',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
218 
219  default : latin_char_points(a_char,a_scale,a_number,a_mx_point,aX,aY,a_width);break;
220  }
221  }

◆ latin_char_points()

static void tools::hershey::latin_char_points ( char  a_char,
float  a_scale,
int &  a_number,
int *  a_mx_point,
float *  aX,
float *  aY,
float &  a_width 
)
inlinestatic

Definition at line 37 of file hershey.

39  {
40 
41  // Latin correspondance with HPLSOF
42  // ABCDEFGHIJKLMNOPQRSTUVWXYZ done with H_ROMAN UPPER
43  // abcdefghijklmnopqrstuvwxyz done with H_ROMAN LOWER
44  // 0123456789 done with H_DIGIT
45  // .,/()-+=* done with H_MATH
46  // $!#>?:;<[]{}%& done with H_SPECIAL
47 
48  switch(a_char) {
49  case 'A':extract(H_ROMAN,H_UPPER,'A',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
50  case 'B':extract(H_ROMAN,H_UPPER,'B',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
51  case 'C':extract(H_ROMAN,H_UPPER,'C',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
52  case 'D':extract(H_ROMAN,H_UPPER,'D',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
53  case 'E':extract(H_ROMAN,H_UPPER,'E',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
54  case 'F':extract(H_ROMAN,H_UPPER,'F',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
55  case 'G':extract(H_ROMAN,H_UPPER,'G',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
56  case 'H':extract(H_ROMAN,H_UPPER,'H',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
57  case 'I':extract(H_ROMAN,H_UPPER,'I',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
58  case 'J':extract(H_ROMAN,H_UPPER,'J',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
59  case 'K':extract(H_ROMAN,H_UPPER,'K',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
60  case 'L':extract(H_ROMAN,H_UPPER,'L',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
61  case 'M':extract(H_ROMAN,H_UPPER,'M',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
62  case 'N':extract(H_ROMAN,H_UPPER,'N',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
63  case 'O':extract(H_ROMAN,H_UPPER,'O',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
64  case 'P':extract(H_ROMAN,H_UPPER,'P',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
65  case 'Q':extract(H_ROMAN,H_UPPER,'Q',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
66  case 'R':extract(H_ROMAN,H_UPPER,'R',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
67  case 'S':extract(H_ROMAN,H_UPPER,'S',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
68  case 'T':extract(H_ROMAN,H_UPPER,'T',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
69  case 'U':extract(H_ROMAN,H_UPPER,'U',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
70  case 'V':extract(H_ROMAN,H_UPPER,'V',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
71  case 'W':extract(H_ROMAN,H_UPPER,'W',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
72  case 'X':extract(H_ROMAN,H_UPPER,'X',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
73  case 'Y':extract(H_ROMAN,H_UPPER,'Y',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
74  case 'Z':extract(H_ROMAN,H_UPPER,'Z',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
75 
76  case 'a':extract(H_ROMAN,H_LOWER,'A',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
77  case 'b':extract(H_ROMAN,H_LOWER,'B',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
78  case 'c':extract(H_ROMAN,H_LOWER,'C',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
79  case 'd':extract(H_ROMAN,H_LOWER,'D',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
80  case 'e':extract(H_ROMAN,H_LOWER,'E',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
81  case 'f':extract(H_ROMAN,H_LOWER,'F',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
82  case 'g':extract(H_ROMAN,H_LOWER,'G',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
83  case 'h':extract(H_ROMAN,H_LOWER,'H',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
84  case 'i':extract(H_ROMAN,H_LOWER,'I',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
85  case 'j':extract(H_ROMAN,H_LOWER,'J',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
86  case 'k':extract(H_ROMAN,H_LOWER,'K',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
87  case 'l':extract(H_ROMAN,H_LOWER,'L',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
88  case 'm':extract(H_ROMAN,H_LOWER,'M',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
89  case 'n':extract(H_ROMAN,H_LOWER,'N',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
90  case 'o':extract(H_ROMAN,H_LOWER,'O',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
91  case 'p':extract(H_ROMAN,H_LOWER,'P',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
92  case 'q':extract(H_ROMAN,H_LOWER,'Q',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
93  case 'r':extract(H_ROMAN,H_LOWER,'R',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
94  case 's':extract(H_ROMAN,H_LOWER,'S',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
95  case 't':extract(H_ROMAN,H_LOWER,'T',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
96  case 'u':extract(H_ROMAN,H_LOWER,'U',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
97  case 'v':extract(H_ROMAN,H_LOWER,'V',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
98  case 'w':extract(H_ROMAN,H_LOWER,'W',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
99  case 'x':extract(H_ROMAN,H_LOWER,'X',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
100  case 'y':extract(H_ROMAN,H_LOWER,'Y',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
101  case 'z':extract(H_ROMAN,H_LOWER,'Z',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
102 
103  case '0':extract(H_DIGIT,H_UPPER,'0',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
104  case '1':extract(H_DIGIT,H_UPPER,'1',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
105  case '2':extract(H_DIGIT,H_UPPER,'2',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
106  case '3':extract(H_DIGIT,H_UPPER,'3',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
107  case '4':extract(H_DIGIT,H_UPPER,'4',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
108  case '5':extract(H_DIGIT,H_UPPER,'5',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
109  case '6':extract(H_DIGIT,H_UPPER,'6',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
110  case '7':extract(H_DIGIT,H_UPPER,'7',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
111  case '8':extract(H_DIGIT,H_UPPER,'8',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
112  case '9':extract(H_DIGIT,H_UPPER,'9',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
113 
114  case '.':extract(H_MATH,H_UPPER,'.',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
115  case ',':extract(H_MATH,H_UPPER,',',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
116  case '/':extract(H_MATH,H_UPPER,'/',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
117  case '(':extract(H_MATH,H_UPPER,'(',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
118  case ')':extract(H_MATH,H_UPPER,')',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
119  case '-':extract(H_MATH,H_UPPER,'-',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
120  case '+':extract(H_MATH,H_UPPER,'+',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
121  case '=':extract(H_MATH,H_UPPER,'=',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
122  case '*':extract(H_MATH,H_UPPER,'*',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
123 
124  case '$':extract(H_SPECIAL,H_UPPER,'D',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
125  case '!':extract(H_SPECIAL,H_UPPER,'E',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
126  case '#':extract(H_SPECIAL,H_UPPER,'F',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
127  case '>':extract(H_SPECIAL,H_UPPER,'G',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
128  case '?':extract(H_SPECIAL,H_UPPER,'H',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
129  case ':':extract(H_SPECIAL,H_UPPER,'J',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
130  case ';':extract(H_SPECIAL,H_UPPER,'K',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
131  case '<':extract(H_SPECIAL,H_UPPER,'L',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
132  case '[':extract(H_SPECIAL,H_UPPER,'M',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
133  case ']':extract(H_SPECIAL,H_UPPER,'N',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
134  case '{':extract(H_SPECIAL,H_UPPER,'P',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
135  case '}':extract(H_SPECIAL,H_UPPER,'Q',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
136  case '%':extract(H_SPECIAL,H_UPPER,'Y',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
137  case '&':extract(H_SPECIAL,H_UPPER,'W',a_scale,a_number,a_mx_point,aX,aY,a_width);break;
138 
139  case '_':
140  a_number = 1;
141  a_mx_point[0] = 2;
142  aX[0] = 0;
143  aY[0] = 0;
144  aX[1] = a_scale;
145  aY[1] = 0;
146  a_width = a_scale;
147  break;
148 
149  case ' ':
150  a_number = 0;
151  a_width = a_scale/2;
152  break;
153 
154  default :
155  a_number = 0;
156  a_width = a_scale;
157  break;
158  }
159  }

◆ max_point()

static unsigned int tools::hershey::max_point ( )
inlinestatic

Definition at line 28 of file hershey.

28 {return 160;} // 40 * 4

◆ max_poly()

static unsigned int tools::hershey::max_poly ( )
inlinestatic

Definition at line 27 of file hershey.

27 { return 8;} //font special reaches 8

◆ special_char_points()

static void tools::hershey::special_char_points ( char  a_char,
float  a_scale,
int &  a_number,
int *  a_mx_point,
float *  aX,
float *  aY,
float &  a_width 
)
inlinestatic

Definition at line 30 of file hershey.

32  {
33  // PAW special characters.
34  extract(H_SPECIAL,H_UPPER,a_char,a_scale,a_number,a_mx_point,aX,aY,a_width);
35  }

The documentation for this class was generated from the following file:
tools::hershey::latin_char_points
static void latin_char_points(char a_char, float a_scale, int &a_number, int *a_mx_point, float *aX, float *aY, float &a_width)
Definition: hershey:37