summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc33
1 files changed, 11 insertions, 22 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
index 624c1eb4163..3179683c261 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ucdn.cc
@@ -16,7 +16,6 @@
#include "hb.hh"
-#include "hb-unicode.hh"
#include "hb-machinery.hh"
#include "ucdn.h"
@@ -182,15 +181,6 @@ hb_ucdn_combining_class(hb_unicode_funcs_t *ufuncs HB_UNUSED,
return (hb_unicode_combining_class_t) ucdn_get_combining_class(unicode);
}
-static unsigned int
-hb_ucdn_eastasian_width(hb_unicode_funcs_t *ufuncs HB_UNUSED,
- hb_codepoint_t unicode,
- void *user_data HB_UNUSED)
-{
- int w = ucdn_get_east_asian_width(unicode);
- return (w == UCDN_EAST_ASIAN_F || w == UCDN_EAST_ASIAN_W) ? 2 : 1;
-}
-
static hb_unicode_general_category_t
hb_ucdn_general_category(hb_unicode_funcs_t *ufuncs HB_UNUSED,
hb_codepoint_t unicode,
@@ -231,16 +221,10 @@ hb_ucdn_decompose(hb_unicode_funcs_t *ufuncs HB_UNUSED,
return ucdn_decompose(ab, a, b);
}
-static unsigned int
-hb_ucdn_decompose_compatibility(hb_unicode_funcs_t *ufuncs HB_UNUSED,
- hb_codepoint_t u, hb_codepoint_t *decomposed,
- void *user_data HB_UNUSED)
-{
- return ucdn_compat_decompose(u, decomposed);
-}
-
+#ifdef HB_USE_ATEXIT
static void free_static_ucdn_funcs (void);
+#endif
static struct hb_ucdn_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_ucdn_unicode_funcs_lazy_loader_t>
{
@@ -248,10 +232,12 @@ static struct hb_ucdn_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader
{
hb_unicode_funcs_t *funcs = hb_unicode_funcs_create (nullptr);
-#define HB_UNICODE_FUNC_IMPLEMENT(name) \
- hb_unicode_funcs_set_##name##_func (funcs, hb_ucdn_##name, nullptr, nullptr);
- HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
+ hb_unicode_funcs_set_combining_class_func (funcs, hb_ucdn_combining_class, nullptr, nullptr);
+ hb_unicode_funcs_set_general_category_func (funcs, hb_ucdn_general_category, nullptr, nullptr);
+ hb_unicode_funcs_set_mirroring_func (funcs, hb_ucdn_mirroring, nullptr, nullptr);
+ hb_unicode_funcs_set_script_func (funcs, hb_ucdn_script, nullptr, nullptr);
+ hb_unicode_funcs_set_compose_func (funcs, hb_ucdn_compose, nullptr, nullptr);
+ hb_unicode_funcs_set_decompose_func (funcs, hb_ucdn_decompose, nullptr, nullptr);
hb_unicode_funcs_make_immutable (funcs);
@@ -273,6 +259,9 @@ void free_static_ucdn_funcs (void)
extern "C" HB_INTERNAL
hb_unicode_funcs_t *
+hb_ucdn_get_unicode_funcs (void);
+
+hb_unicode_funcs_t *
hb_ucdn_get_unicode_funcs (void)
{
return static_ucdn_funcs.get_unconst ();