4 * Copyright (C) 2013-2014 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
16 /* originally file `afblue.h' (2013-Sep-11) from FreeType */
23 /* an auxiliary macro to decode a UTF-8 character -- since we only use */
24 /* hard-coded, self-converted data, no error checking is performed */
25 #define GET_UTF8_CHAR(ch, p) \
26 ch = (unsigned char)*p++; \
48 for (; len > 0; len--) \
49 ch = (ch << 6) | (*p++ & 0x3F); \
53 /****************************************************************
57 ****************************************************************/
59 /* At the bottommost level, we define strings for finding blue zones. */
62 #define TA_BLUE_STRING_MAX_LEN @TA_BLUE_STRING_MAX_LEN@
64 /* The TA_Blue_String enumeration values are offsets into the */
65 /* `ta_blue_strings' array. */
67 typedef enum TA_Blue_String_
71 TA_BLUE_STRING_MAX /* do not remove */
75 extern const char ta_blue_strings[];
78 /****************************************************************
82 ****************************************************************/
84 /* The next level is to group blue strings into style-specific sets. */
87 /* Properties are specific to a writing system. We assume that a given */
88 /* blue string can't be used in more than a single writing system, which */
90 #define TA_BLUE_PROPERTY_LATIN_TOP (1 << 0) /* must have value 1 */
91 #define TA_BLUE_PROPERTY_LATIN_NEUTRAL (1 << 1)
92 #define TA_BLUE_PROPERTY_LATIN_X_HEIGHT (1 << 2)
93 #define TA_BLUE_PROPERTY_LATIN_LONG (1 << 3)
96 #define TA_BLUE_STRINGSET_MAX_LEN @TA_BLUE_STRINGSET_MAX_LEN@
98 /* The TA_Blue_Stringset enumeration values are offsets into the */
99 /* `ta_blue_stringsets' array. */
101 typedef enum TA_Blue_Stringset_
103 @TA_BLUE_STRINGSET_ENUM@
105 TA_BLUE_STRINGSET_MAX /* do not remove */
109 typedef struct TA_Blue_StringRec_
111 TA_Blue_String string;
112 FT_UShort properties;
116 extern const TA_Blue_StringRec ta_blue_stringsets[];
118 #endif /* __TABLUE_H__ */
120 /* end of tablue.h */