2 * Copyright (C) 2009 Red Hat, Inc.
4 * This is part of HarfBuzz, an OpenType Layout engine library.
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 * Red Hat Author(s): Behdad Esfahbod
30 #include "hb-common.h"
34 /* Unicode General Category property */
39 HB_CATEGORY_UNASSIGNED,
40 HB_CATEGORY_PRIVATE_USE,
41 HB_CATEGORY_SURROGATE,
42 HB_CATEGORY_LOWERCASE_LETTER,
43 HB_CATEGORY_MODIFIER_LETTER,
44 HB_CATEGORY_OTHER_LETTER,
45 HB_CATEGORY_TITLECASE_LETTER,
46 HB_CATEGORY_UPPERCASE_LETTER,
47 HB_CATEGORY_COMBINING_MARK,
48 HB_CATEGORY_ENCLOSING_MARK,
49 HB_CATEGORY_NON_SPACING_MARK,
50 HB_CATEGORY_DECIMAL_NUMBER,
51 HB_CATEGORY_LETTER_NUMBER,
52 HB_CATEGORY_OTHER_NUMBER,
53 HB_CATEGORY_CONNECT_PUNCTUATION,
54 HB_CATEGORY_DASH_PUNCTUATION,
55 HB_CATEGORY_CLOSE_PUNCTUATION,
56 HB_CATEGORY_FINAL_PUNCTUATION,
57 HB_CATEGORY_INITIAL_PUNCTUATION,
58 HB_CATEGORY_OTHER_PUNCTUATION,
59 HB_CATEGORY_OPEN_PUNCTUATION,
60 HB_CATEGORY_CURRENCY_SYMBOL,
61 HB_CATEGORY_MODIFIER_SYMBOL,
62 HB_CATEGORY_MATH_SYMBOL,
63 HB_CATEGORY_OTHER_SYMBOL,
64 HB_CATEGORY_LINE_SEPARATOR,
65 HB_CATEGORY_PARAGRAPH_SEPARATOR,
66 HB_CATEGORY_SPACE_SEPARATOR
69 /* Unicode Script property */
71 { /* ISO 15924 code */
72 HB_SCRIPT_INVALID_CODE = -1,
73 HB_SCRIPT_COMMON = 0, /* Zyyy */
74 HB_SCRIPT_INHERITED, /* Qaai */
75 HB_SCRIPT_ARABIC, /* Arab */
76 HB_SCRIPT_ARMENIAN, /* Armn */
77 HB_SCRIPT_BENGALI, /* Beng */
78 HB_SCRIPT_BOPOMOFO, /* Bopo */
79 HB_SCRIPT_CHEROKEE, /* Cher */
80 HB_SCRIPT_COPTIC, /* Qaac */
81 HB_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
82 HB_SCRIPT_DESERET, /* Dsrt */
83 HB_SCRIPT_DEVANAGARI, /* Deva */
84 HB_SCRIPT_ETHIOPIC, /* Ethi */
85 HB_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
86 HB_SCRIPT_GOTHIC, /* Goth */
87 HB_SCRIPT_GREEK, /* Grek */
88 HB_SCRIPT_GUJARATI, /* Gujr */
89 HB_SCRIPT_GURMUKHI, /* Guru */
90 HB_SCRIPT_HAN, /* Hani */
91 HB_SCRIPT_HANGUL, /* Hang */
92 HB_SCRIPT_HEBREW, /* Hebr */
93 HB_SCRIPT_HIRAGANA, /* Hira */
94 HB_SCRIPT_KANNADA, /* Knda */
95 HB_SCRIPT_KATAKANA, /* Kana */
96 HB_SCRIPT_KHMER, /* Khmr */
97 HB_SCRIPT_LAO, /* Laoo */
98 HB_SCRIPT_LATIN, /* Latn (Latf, Latg) */
99 HB_SCRIPT_MALAYALAM, /* Mlym */
100 HB_SCRIPT_MONGOLIAN, /* Mong */
101 HB_SCRIPT_MYANMAR, /* Mymr */
102 HB_SCRIPT_OGHAM, /* Ogam */
103 HB_SCRIPT_OLD_ITALIC, /* Ital */
104 HB_SCRIPT_ORIYA, /* Orya */
105 HB_SCRIPT_RUNIC, /* Runr */
106 HB_SCRIPT_SINHALA, /* Sinh */
107 HB_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
108 HB_SCRIPT_TAMIL, /* Taml */
109 HB_SCRIPT_TELUGU, /* Telu */
110 HB_SCRIPT_THAANA, /* Thaa */
111 HB_SCRIPT_THAI, /* Thai */
112 HB_SCRIPT_TIBETAN, /* Tibt */
113 HB_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
114 HB_SCRIPT_YI, /* Yiii */
115 HB_SCRIPT_TAGALOG, /* Tglg */
116 HB_SCRIPT_HANUNOO, /* Hano */
117 HB_SCRIPT_BUHID, /* Buhd */
118 HB_SCRIPT_TAGBANWA, /* Tagb */
120 /* Unicode-4.0 additions */
121 HB_SCRIPT_BRAILLE, /* Brai */
122 HB_SCRIPT_CYPRIOT, /* Cprt */
123 HB_SCRIPT_LIMBU, /* Limb */
124 HB_SCRIPT_OSMANYA, /* Osma */
125 HB_SCRIPT_SHAVIAN, /* Shaw */
126 HB_SCRIPT_LINEAR_B, /* Linb */
127 HB_SCRIPT_TAI_LE, /* Tale */
128 HB_SCRIPT_UGARITIC, /* Ugar */
130 /* Unicode-4.1 additions */
131 HB_SCRIPT_NEW_TAI_LUE, /* Talu */
132 HB_SCRIPT_BUGINESE, /* Bugi */
133 HB_SCRIPT_GLAGOLITIC, /* Glag */
134 HB_SCRIPT_TIFINAGH, /* Tfng */
135 HB_SCRIPT_SYLOTI_NAGRI, /* Sylo */
136 HB_SCRIPT_OLD_PERSIAN, /* Xpeo */
137 HB_SCRIPT_KHAROSHTHI, /* Khar */
139 /* Unicode-5.0 additions */
140 HB_SCRIPT_UNKNOWN, /* Zzzz */
141 HB_SCRIPT_BALINESE, /* Bali */
142 HB_SCRIPT_CUNEIFORM, /* Xsux */
143 HB_SCRIPT_PHOENICIAN, /* Phnx */
144 HB_SCRIPT_PHAGS_PA, /* Phag */
145 HB_SCRIPT_NKO, /* Nkoo */
147 /* Unicode-5.1 additions */
148 HB_SCRIPT_KAYAH_LI, /* Kali */
149 HB_SCRIPT_LEPCHA, /* Lepc */
150 HB_SCRIPT_REJANG, /* Rjng */
151 HB_SCRIPT_SUNDANESE, /* Sund */
152 HB_SCRIPT_SAURASHTRA, /* Saur */
153 HB_SCRIPT_CHAM, /* Cham */
154 HB_SCRIPT_OL_CHIKI, /* Olck */
155 HB_SCRIPT_VAI, /* Vaii */
156 HB_SCRIPT_CARIAN, /* Cari */
157 HB_SCRIPT_LYCIAN, /* Lyci */
158 HB_SCRIPT_LYDIAN /* Lydi */
166 typedef struct _hb_unicode_funcs_t hb_unicode_funcs_t;
169 hb_unicode_funcs_create (void);
172 hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
175 hb_unicode_funcs_get_reference_count (hb_unicode_funcs_t *ufuncs);
178 hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
181 hb_unicode_funcs_copy (hb_unicode_funcs_t *ufuncs);
187 typedef hb_codepoint_t (*hb_unicode_get_mirroring_char_func_t) (hb_codepoint_t unicode);
188 typedef hb_category_t (*hb_unicode_get_general_category_func_t) (hb_codepoint_t unicode);
189 typedef hb_script_t (*hb_unicode_get_script_func_t) (hb_codepoint_t unicode);
190 typedef unsigned int (*hb_unicode_get_combining_class_func_t) (hb_codepoint_t unicode);
191 typedef unsigned int (*hb_unicode_get_eastasian_width_func_t) (hb_codepoint_t unicode);
195 hb_unicode_funcs_set_mirroring_char_func (hb_unicode_funcs_t *ufuncs,
196 hb_unicode_get_mirroring_char_func_t mirroring_char_func);
199 hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
200 hb_unicode_get_general_category_func_t general_category_func);
203 hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
204 hb_unicode_get_script_func_t script_func);
207 hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
208 hb_unicode_get_combining_class_func_t combining_class_func);
211 hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
212 hb_unicode_get_eastasian_width_func_t eastasian_width_func);
217 #endif /* HB_FONT_H */