1 From 6bce537e813081511d7899a235872ff794dbce1a Mon Sep 17 00:00:00 2001
2 From: Jongmin Lee <jm105.lee@samsung.com>
3 Date: Wed, 4 Dec 2019 09:54:01 +0900
4 Subject: [PATCH] remove icu header dependencies from harfbuzz header
6 Harfbuzz header include icu header that is not Tizen public API.
7 In order to remove icu header from rootstrap, icu header dependencies
12 Change-Id: Ic73ee83de294c09fe3bf047eb3ed7f7c85bdc8c3
14 src/hb-icu.cc | 17 ++++++++++-------
15 src/hb-icu.h | 5 ++---
16 2 files changed, 12 insertions(+), 10 deletions(-)
18 diff --git a/src/hb-icu.cc b/src/hb-icu.cc
19 index c26c91d..7e89f78 100644
23 #include <unicode/ustring.h>
24 #include <unicode/utf16.h>
25 #include <unicode/uversion.h>
26 +#include <unicode/uscript.h>
34 -hb_icu_script_to_script (UScriptCode script)
35 +hb_icu_script_to_script (unsigned int numScript)
37 + UScriptCode script = (UScriptCode) numScript;
39 if (unlikely (script == USCRIPT_INVALID_CODE))
40 return HB_SCRIPT_INVALID;
42 return hb_script_from_string (uscript_getShortName (script), -1);
47 hb_icu_script_from_script (hb_script_t script)
49 if (unlikely (script == HB_SCRIPT_INVALID))
50 - return USCRIPT_INVALID_CODE;
51 + return (unsigned int) USCRIPT_INVALID_CODE;
53 unsigned int numScriptCode = 1 + u_getIntPropertyMaxValue (UCHAR_SCRIPT);
54 for (unsigned int i = 0; i < numScriptCode; i++)
55 - if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script))
56 - return (UScriptCode) i;
57 + if (unlikely (hb_icu_script_to_script (i) == script))
60 - return USCRIPT_UNKNOWN;
61 + return (unsigned int) USCRIPT_UNKNOWN;
65 @@ -153,7 +156,7 @@ hb_icu_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED,
66 if (unlikely (U_FAILURE (status)))
67 return HB_SCRIPT_UNKNOWN;
69 - return hb_icu_script_to_script (scriptCode);
70 + return hb_icu_script_to_script ((unsigned int) scriptCode);
74 diff --git a/src/hb-icu.h b/src/hb-icu.h
75 index 2db6a7b..dc6d7aa 100644
82 -#include <unicode/uscript.h>
88 -hb_icu_script_to_script (UScriptCode script);
89 +hb_icu_script_to_script (unsigned int numScript);
91 -HB_EXTERN UScriptCode
92 +HB_EXTERN unsigned int
93 hb_icu_script_from_script (hb_script_t script);