From 5ceefa1d8dbd310570ea8d1c47107fe8d3dc96d9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 20 Dec 2009 15:29:16 +0100 Subject: [PATCH] Add hb_unicode_get_*() functions --- src/hb-unicode.c | 37 +++++++++++++++++++++++++++++++++++++ src/hb-unicode.h | 21 +++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/src/hb-unicode.c b/src/hb-unicode.c index d8ea0ea..a897f23 100644 --- a/src/hb-unicode.c +++ b/src/hb-unicode.c @@ -160,6 +160,43 @@ hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, } +hb_codepoint_t +hb_unicode_get_mirroring (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode) +{ + return ufuncs->get_mirroring (unicode); +} + +hb_category_t +hb_unicode_get_general_category (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode) +{ + return ufuncs->get_general_category (unicode); +} + +hb_script_t +hb_unicode_get_script (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode) +{ + return ufuncs->get_script (unicode); +} + +unsigned int +hb_unicode_get_combining_class (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode) +{ + return ufuncs->get_combining_class (unicode); +} + +unsigned int +hb_unicode_get_eastasian_width (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode) +{ + return ufuncs->get_eastasian_width (unicode); +} + + + #define LTR HB_DIRECTION_LTR #define RTL HB_DIRECTION_RTL const hb_direction_t horiz_dir[] = diff --git a/src/hb-unicode.h b/src/hb-unicode.h index b7c3a75..6b63352 100644 --- a/src/hb-unicode.h +++ b/src/hb-unicode.h @@ -214,6 +214,27 @@ hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, hb_unicode_get_eastasian_width_func_t eastasian_width_func); +hb_codepoint_t +hb_unicode_get_mirroring (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +hb_category_t +hb_unicode_get_general_category (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +hb_script_t +hb_unicode_get_script (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +unsigned int +hb_unicode_get_combining_class (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + +unsigned int +hb_unicode_get_eastasian_width (hb_unicode_funcs_t *ufuncs, + hb_codepoint_t unicode); + + HB_END_DECLS #endif /* HB_UNICODE_H */ -- 2.7.4