ReactOS  0.4.15-dev-1377-ga59cecd
afblue.h
Go to the documentation of this file.
1 /* This file has been generated by the Perl script `afblue.pl', */
2 /* using data from file `afblue.dat'. */
3 
4 /***************************************************************************/
5 /* */
6 /* afblue.h */
7 /* */
8 /* Auto-fitter data for blue strings (specification). */
9 /* */
10 /* Copyright 2013-2018 by */
11 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
12 /* */
13 /* This file is part of the FreeType project, and may only be used, */
14 /* modified, and distributed under the terms of the FreeType project */
15 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
16 /* this file you indicate that you have read the license and */
17 /* understand and accept it fully. */
18 /* */
19 /***************************************************************************/
20 
21 
22 #ifndef AFBLUE_H_
23 #define AFBLUE_H_
24 
25 
27 
28 
29  /* an auxiliary macro to decode a UTF-8 character -- since we only use */
30  /* hard-coded, self-converted data, no error checking is performed */
31 #define GET_UTF8_CHAR( ch, p ) \
32  do \
33  { \
34  ch = (unsigned char)*p++; \
35  if ( ch >= 0x80 ) \
36  { \
37  FT_UInt len_; \
38  \
39  \
40  if ( ch < 0xE0 ) \
41  { \
42  len_ = 1; \
43  ch &= 0x1F; \
44  } \
45  else if ( ch < 0xF0 ) \
46  { \
47  len_ = 2; \
48  ch &= 0x0F; \
49  } \
50  else \
51  { \
52  len_ = 3; \
53  ch &= 0x07; \
54  } \
55  \
56  for ( ; len_ > 0; len_-- ) \
57  ch = ( ch << 6 ) | ( *p++ & 0x3F ); \
58  } \
59  } while ( 0 )
60 
61 
62  /*************************************************************************/
63  /*************************************************************************/
64  /***** *****/
65  /***** B L U E S T R I N G S *****/
66  /***** *****/
67  /*************************************************************************/
68  /*************************************************************************/
69 
70  /* At the bottommost level, we define strings for finding blue zones. */
71 
72 
73 #define AF_BLUE_STRING_MAX_LEN 51
74 
75  /* The AF_Blue_String enumeration values are offsets into the */
76  /* `af_blue_strings' array. */
77 
78  typedef enum AF_Blue_String_
79  {
262  af_blue_1_1 = 4756,
263 #ifdef AF_CONFIG_OPTION_CJK
264  AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
265  AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
266  af_blue_1_1_1 = af_blue_1_1 + 404,
267 #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
268  AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1,
269  AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 204,
270  af_blue_1_1_2 = af_blue_1_1_1 + 405,
271 #else
272  af_blue_1_1_2 = af_blue_1_1_1 + 0,
273 #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
274  af_blue_1_2 = af_blue_1_1_2 + 0,
275 #else
277 #endif /* AF_CONFIG_OPTION_CJK */
278 
279 
280  AF_BLUE_STRING_MAX /* do not remove */
281 
282  } AF_Blue_String;
283 
284 
285  FT_LOCAL_ARRAY( char )
287 
288 
289  /*************************************************************************/
290  /*************************************************************************/
291  /***** *****/
292  /***** B L U E S T R I N G S E T S *****/
293  /***** *****/
294  /*************************************************************************/
295  /*************************************************************************/
296 
297  /* The next level is to group blue strings into style-specific sets. */
298 
299 
300  /* Properties are specific to a writing system. We assume that a given */
301  /* blue string can't be used in more than a single writing system, which */
302  /* is a safe bet. */
303 #define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */
304 #define AF_BLUE_PROPERTY_LATIN_SUB_TOP ( 1U << 1 )
305 #define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 2 )
306 #define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 3 )
307 #define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 4 )
308 
309 #define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */
310 #define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */
311 #define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP
312 
313 
314 #define AF_BLUE_STRINGSET_MAX_LEN 8
315 
316  /* The AF_Blue_Stringset enumeration values are offsets into the */
317  /* `af_blue_stringsets' array. */
318 
319  typedef enum AF_Blue_Stringset_
320  {
373  af_blue_2_1 = 245,
374 #ifdef AF_CONFIG_OPTION_CJK
375  AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
376  af_blue_2_1_1 = af_blue_2_1 + 2,
377 #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
378  af_blue_2_1_2 = af_blue_2_1_1 + 2,
379 #else
380  af_blue_2_1_2 = af_blue_2_1_1 + 0,
381 #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
382  af_blue_2_2 = af_blue_2_1_2 + 1,
383 #else
385 #endif /* AF_CONFIG_OPTION_CJK */
386 
387 
388  AF_BLUE_STRINGSET_MAX /* do not remove */
389 
391 
392 
393  typedef struct AF_Blue_StringRec_
394  {
397 
399 
400 
403 
404 /* */
405 
407 
408 
409 #endif /* AFBLUE_H_ */
410 
411 
412 /* END */
#define FT_LOCAL_ARRAY(x)
Definition: ftconfig.h:393
#define FT_END_HEADER
Definition: ftheader.h:54
enum AF_Blue_String_ AF_Blue_String
AF_Blue_String string
Definition: afblue.h:395
AF_Blue_Stringset_
Definition: afblue.h:319
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_UShort properties
Definition: afblue.h:396
af_blue_strings[]
Definition: afblue.h:286
af_blue_stringsets[]
Definition: afblue.h:402
struct AF_Blue_StringRec_ AF_Blue_StringRec
enum AF_Blue_Stringset_ AF_Blue_Stringset
AF_Blue_String_
Definition: afblue.h:78
unsigned short FT_UShort
Definition: fttypes.h:209