41 # define HB_BEGIN_DECLS |
41 # define HB_BEGIN_DECLS |
42 # define HB_END_DECLS |
42 # define HB_END_DECLS |
43 # endif /* !__cplusplus */ |
43 # endif /* !__cplusplus */ |
44 #endif |
44 #endif |
45 |
45 |
46 #if !defined (HB_DONT_DEFINE_STDINT) |
|
47 |
|
48 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ |
46 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ |
49 defined (_sgi) || defined (__sun) || defined (sun) || \ |
47 defined (_sgi) || defined (__sun) || defined (sun) || \ |
50 defined (__digital__) || defined (__HP_cc) |
48 defined (__digital__) || defined (__HP_cc) |
51 # include <inttypes.h> |
49 # include <inttypes.h> |
52 #elif defined (_AIX) |
50 #elif defined (_AIX) |
53 # include <sys/inttypes.h> |
51 # include <sys/inttypes.h> |
54 /* VS 2010 (_MSC_VER 1600) has stdint.h */ |
|
55 #elif defined (_MSC_VER) && _MSC_VER < 1600 |
|
56 typedef __int8 int8_t; |
|
57 typedef unsigned __int8 uint8_t; |
|
58 typedef __int16 int16_t; |
|
59 typedef unsigned __int16 uint16_t; |
|
60 typedef __int32 int32_t; |
|
61 typedef unsigned __int32 uint32_t; |
|
62 typedef __int64 int64_t; |
|
63 typedef unsigned __int64 uint64_t; |
|
64 #else |
52 #else |
65 # include <stdint.h> |
53 # include <stdint.h> |
66 #endif |
|
67 |
|
68 #endif |
54 #endif |
69 |
55 |
70 HB_BEGIN_DECLS |
56 HB_BEGIN_DECLS |
71 |
57 |
72 |
58 |
146 hb_language_from_string (const char *str, int len); |
132 hb_language_from_string (const char *str, int len); |
147 |
133 |
148 HB_EXTERN const char * |
134 HB_EXTERN const char * |
149 hb_language_to_string (hb_language_t language); |
135 hb_language_to_string (hb_language_t language); |
150 |
136 |
151 #define HB_LANGUAGE_INVALID ((hb_language_t) NULL) |
137 #define HB_LANGUAGE_INVALID ((hb_language_t) 0) |
152 |
138 |
153 HB_EXTERN hb_language_t |
139 HB_EXTERN hb_language_t |
154 hb_language_get_default (void); |
140 hb_language_get_default (void); |
155 |
141 |
156 |
142 |
319 /*9.0*/ HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), |
305 /*9.0*/ HB_SCRIPT_MARCHEN = HB_TAG ('M','a','r','c'), |
320 /*9.0*/ HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), |
306 /*9.0*/ HB_SCRIPT_OSAGE = HB_TAG ('O','s','g','e'), |
321 /*9.0*/ HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), |
307 /*9.0*/ HB_SCRIPT_TANGUT = HB_TAG ('T','a','n','g'), |
322 /*9.0*/ HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), |
308 /*9.0*/ HB_SCRIPT_NEWA = HB_TAG ('N','e','w','a'), |
323 |
309 |
|
310 /* |
|
311 * Since 1.6.0 |
|
312 */ |
|
313 /*10.0*/HB_SCRIPT_MASARAM_GONDI = HB_TAG ('G','o','n','m'), |
|
314 /*10.0*/HB_SCRIPT_NUSHU = HB_TAG ('N','s','h','u'), |
|
315 /*10.0*/HB_SCRIPT_SOYOMBO = HB_TAG ('S','o','y','o'), |
|
316 /*10.0*/HB_SCRIPT_ZANABAZAR_SQUARE = HB_TAG ('Z','a','n','b'), |
|
317 |
324 /* No script set. */ |
318 /* No script set. */ |
325 HB_SCRIPT_INVALID = HB_TAG_NONE, |
319 HB_SCRIPT_INVALID = HB_TAG_NONE, |
326 |
320 |
327 /* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t |
321 /* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t |
328 * without risking undefined behavior. Include both a signed and unsigned max, |
322 * without risking undefined behavior. Include both a signed and unsigned max, |
360 } hb_user_data_key_t; |
354 } hb_user_data_key_t; |
361 |
355 |
362 typedef void (*hb_destroy_func_t) (void *user_data); |
356 typedef void (*hb_destroy_func_t) (void *user_data); |
363 |
357 |
364 |
358 |
|
359 /* Font features and variations. */ |
|
360 |
|
361 typedef struct hb_feature_t { |
|
362 hb_tag_t tag; |
|
363 uint32_t value; |
|
364 unsigned int start; |
|
365 unsigned int end; |
|
366 } hb_feature_t; |
|
367 |
|
368 HB_EXTERN hb_bool_t |
|
369 hb_feature_from_string (const char *str, int len, |
|
370 hb_feature_t *feature); |
|
371 |
|
372 HB_EXTERN void |
|
373 hb_feature_to_string (hb_feature_t *feature, |
|
374 char *buf, unsigned int size); |
|
375 |
|
376 /** |
|
377 * hb_variation_t: |
|
378 * |
|
379 * Since: 1.4.2 |
|
380 */ |
|
381 typedef struct hb_variation_t { |
|
382 hb_tag_t tag; |
|
383 float value; |
|
384 } hb_variation_t; |
|
385 |
|
386 HB_EXTERN hb_bool_t |
|
387 hb_variation_from_string (const char *str, int len, |
|
388 hb_variation_t *variation); |
|
389 |
|
390 HB_EXTERN void |
|
391 hb_variation_to_string (hb_variation_t *variation, |
|
392 char *buf, unsigned int size); |
|
393 |
|
394 |
365 HB_END_DECLS |
395 HB_END_DECLS |
366 |
396 |
367 #endif /* HB_COMMON_H */ |
397 #endif /* HB_COMMON_H */ |