4 * Copyright (C) 2013-2019 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) \
28 ch = (unsigned char)*p++; \
50 for (; len_ > 0; len_--) \
51 ch = (ch << 6) | (*p++ & 0x3F); \
56 /****************************************************************
60 ****************************************************************/
62 /* At the bottommost level, we define strings for finding blue zones. */
65 #define TA_BLUE_STRING_MAX_LEN @TA_BLUE_STRING_MAX_LEN@
67 /* The TA_Blue_String enumeration values are offsets into the */
68 /* `ta_blue_strings' array. */
70 typedef enum TA_Blue_String_
74 TA_BLUE_STRING_MAX /* do not remove */
78 extern const char ta_blue_strings[];
81 /****************************************************************
85 ****************************************************************/
87 /* The next level is to group blue strings into style-specific sets. */
90 /* Properties are specific to a writing system. We assume that a given */
91 /* blue string can't be used in more than a single writing system, which */
93 #define TA_BLUE_PROPERTY_LATIN_TOP (1U << 0) /* must have value 1 */
94 #define TA_BLUE_PROPERTY_LATIN_SUB_TOP (1U << 1)
95 #define TA_BLUE_PROPERTY_LATIN_NEUTRAL (1U << 2)
96 #define TA_BLUE_PROPERTY_LATIN_X_HEIGHT (1U << 3)
97 #define TA_BLUE_PROPERTY_LATIN_LONG (1U << 4)
100 #define TA_BLUE_STRINGSET_MAX_LEN @TA_BLUE_STRINGSET_MAX_LEN@
102 /* The TA_Blue_Stringset enumeration values are offsets into the */
103 /* `ta_blue_stringsets' array. */
105 typedef enum TA_Blue_Stringset_
107 @TA_BLUE_STRINGSET_ENUM@
109 TA_BLUE_STRINGSET_MAX /* do not remove */
113 typedef struct TA_Blue_StringRec_
115 TA_Blue_String string;
116 FT_UShort properties;
120 extern const TA_Blue_StringRec ta_blue_stringsets[];
122 #endif /* TABLUE_H_ */
124 /* end of tablue.h */