Dear all, >From the patch's commit log: I guess there are uses for exposing those, though if really wanted, we should probably add a "hb-glib-utils.h" file and not include it in hb-glib.h. Rationale: users of Harfbuzz may want to use the glib unicode functions but don't want to work against glib itself (e.g they don't have the glib headers in their system).
In the project I'm working on for example, we are only using the glib unicode functions in the meanwhile and it's just annoying to add special checks to see if glib is present in the system and if so add it's cflags. With this patch I can just check for availability of hb-glib.h and get done with it." Btw, what about adding a function that just returns the preferred unicode functions no matter what's installed? Fairly easy to implement, just define an precedence and: #ifdef HB_GLIB return get_glib_funcs.... #elif defined(HB_ICU) return get_icu_funcs... ... #endif I guess users of the API don't really care where they get their unicode funcs from (I know I don't care) and this will make harfbuzz a lot easier to work with. What do you think? Tom.
>From 3f7080ec4e7a11e8f8313612ba58f9154d179629 Mon Sep 17 00:00:00 2001 From: Tom 'TAsn' Hacohen <[email protected]> Date: Thu, 21 Apr 2011 16:50:06 +0300 Subject: [PATCH] [glib] Move two-way script conversion functions to be private. I guess there are uses for exposing those, though if really wanted, we should probably add a "hb-glib-utils.h" file and not include it in hb-glib.h. Rationale: users of Harfbuzz may want to use the glib unicode functions but don't want to work against glib itself (e.g they don't have the glib headers in their system). --- src/hb-glib.cc | 4 ++-- src/hb-glib.h | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/hb-glib.cc b/src/hb-glib.cc index 158a210..64ffe38 100644 --- a/src/hb-glib.cc +++ b/src/hb-glib.cc @@ -147,7 +147,7 @@ glib_script_to_script[] = HB_SCRIPT_MANDAIC }; -hb_script_t +static hb_script_t hb_glib_script_to_script (GUnicodeScript script) { if (likely ((unsigned int) script < ARRAY_LENGTH (glib_script_to_script))) @@ -159,7 +159,7 @@ hb_glib_script_to_script (GUnicodeScript script) return HB_SCRIPT_UNKNOWN; } -GUnicodeScript +static GUnicodeScript hb_glib_script_from_script (hb_script_t script) { unsigned int count = ARRAY_LENGTH (glib_script_to_script); diff --git a/src/hb-glib.h b/src/hb-glib.h index abec2d2..3c9bb43 100644 --- a/src/hb-glib.h +++ b/src/hb-glib.h @@ -28,18 +28,9 @@ #define HB_GLIB_H #include "hb.h" -#include <glib.h> HB_BEGIN_DECLS - -hb_script_t -hb_glib_script_to_script (GUnicodeScript script); - -GUnicodeScript -hb_glib_script_from_script (hb_script_t script); - - hb_unicode_funcs_t * hb_glib_get_unicode_funcs (void); -- 1.7.0.4
_______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
