Index: third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc |
=================================================================== |
--- third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc (리비전 201894) |
+++ third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc (작업 사본) |
@@ -170,7 +170,7 @@ |
} |
/* Returns 0 if didn't decompose, number of resulting characters otherwise. */ |
-static inline bool |
+static inline unsigned int |
decompose_compatibility (const hb_ot_shape_normalize_context_t *c, hb_codepoint_t u) |
{ |
unsigned int len, i; |
@@ -191,7 +191,6 @@ |
return len; |
} |
-/* Returns true if recomposition may be benefitial. */ |
static inline void |
decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest) |
{ |
@@ -231,7 +230,6 @@ |
} |
} |
-/* Returns true if recomposition may be benefitial. */ |
static inline void |
decompose_multi_char_cluster (const hb_ot_shape_normalize_context_t *c, unsigned int end) |
{ |
@@ -353,12 +351,11 @@ |
while (buffer->idx < count) |
{ |
hb_codepoint_t composed, glyph; |
- if (/* If mode is NOT COMPOSED_FULL (ie. it's COMPOSED_DIACRITICS), we don't try to |
- * compose a non-mark character with it's preceding starter. This is just an |
- * optimization to avoid trying to compose every two neighboring glyphs in most |
- * scripts. */ |
- (mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL || |
- HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->cur()))) && |
+ if (/* We don't try to compose a non-mark character with it's preceding starter. |
+ * This is both an optimization to avoid trying to compose every two neighboring |
+ * glyphs in most scripts AND a desired feature for Hangul. Apparently Hangul |
+ * fonts are not designed to mix-and-match pre-composed syllables and Jamo. */ |
+ HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->cur())) && |
/* If there's anything between the starter and this char, they should have CCC |
* smaller than this character's. */ |
(starter == buffer->out_len - 1 || |