[HarfBuzz] harfbuzz: Branch 'master' - 4 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Dec 28 18:47:47 UTC 2016
src/hb-ot-shape-complex-indic.cc | 24 ---------------------
src/hb-ot-shape-complex-use.cc | 43 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 25 deletions(-)
New commits:
commit 6cff75394192a1ab0dda82981752ade532838333
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Dec 28 13:46:21 2016 -0500
Remove Tibetan decomposition rules from Indic shaper
The decomposition is very obscure and unlikely to help
any fonts. Just remove it since Uniscribe probably doesn't
do this either.
Fixes https://github.com/behdad/harfbuzz/issues/382
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 19aca56..b48fb56 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -1721,10 +1721,6 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
* Decompose split matras that don't have Unicode decompositions.
*/
- /* Tibetan */
- case 0x0F77u : *a = 0x0FB2u; *b= 0x0F81u; return true;
- case 0x0F79u : *a = 0x0FB3u; *b= 0x0F81u; return true;
-
/* Khmer */
case 0x17BEu : *a = 0x17C1u; *b= 0x17BEu; return true;
case 0x17BFu : *a = 0x17C1u; *b= 0x17BFu; return true;
commit f6ba63b2e8eb577385f70758efdd3b8408c8a9cb
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Dec 28 13:45:32 2016 -0500
Port decompositions from Indic to USE shaper
Part of https://github.com/behdad/harfbuzz/issues/382
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 36fa014..19aca56 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -1732,13 +1732,6 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
case 0x17C4u : *a = 0x17C1u; *b= 0x17C4u; return true;
case 0x17C5u : *a = 0x17C1u; *b= 0x17C5u; return true;
- /* Limbu */
- case 0x1925u : *a = 0x1920u; *b= 0x1923u; return true;
- case 0x1926u : *a = 0x1920u; *b= 0x1924u; return true;
-
- /* Balinese */
- case 0x1B3Cu : *a = 0x1B42u; *b= 0x1B3Cu; return true;
-
#if 0
/* Gujarati */
/* This one has no decomposition in Unicode, but needs no decomposition either. */
@@ -1746,15 +1739,6 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
/* Oriya */
case 0x0B57u : *a = no decomp, -> RIGHT; return true;
-
- /* Lepcha */
- case 0x1C29u : *a = no decomp, -> LEFT; return true;
-
- /* Javanese */
- case 0xA9C0u : *a = no decomp, -> RIGHT; return true;
-
- /* Sharada */
- case 0x111BFu : *a = no decomp, -> ABOVE; return true;
#endif
}
diff --git a/src/hb-ot-shape-complex-use.cc b/src/hb-ot-shape-complex-use.cc
index af68706..5b19d5d 100644
--- a/src/hb-ot-shape-complex-use.cc
+++ b/src/hb-ot-shape-complex-use.cc
@@ -572,6 +572,28 @@ decompose_use (const hb_ot_shape_normalize_context_t *c,
*/
case 0x1112Eu : *a = 0x11127u; *b= 0x11131u; return true;
case 0x1112Fu : *a = 0x11127u; *b= 0x11132u; return true;
+
+ /*
+ * Decompose split matras that don't have Unicode decompositions.
+ */
+
+ /* Limbu */
+ case 0x1925u : *a = 0x1920u; *b= 0x1923u; return true;
+ case 0x1926u : *a = 0x1920u; *b= 0x1924u; return true;
+
+ /* Balinese */
+ case 0x1B3Cu : *a = 0x1B42u; *b= 0x1B3Cu; return true;
+
+#if 0
+ /* Lepcha */
+ case 0x1C29u : *a = no decomp, -> LEFT; return true;
+
+ /* Javanese */
+ case 0xA9C0u : *a = no decomp, -> RIGHT; return true;
+
+ /* Sharada */
+ case 0x111BFu : *a = no decomp, -> ABOVE; return true;
+#endif
}
return (bool) c->unicode->decompose (ab, a, b);
commit e678b537f77954615721abd65fef28854f95dc5d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Dec 26 14:11:59 2016 -0500
[indic] Remove Chakma decomposition rule from Indic shaper
This is now added to USE:
https://github.com/behdad/harfbuzz/pull/383
See:
https://github.com/behdad/harfbuzz/issues/381
https://github.com/behdad/harfbuzz/issues/382
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 54fbfff..36fa014 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -1739,10 +1739,6 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
/* Balinese */
case 0x1B3Cu : *a = 0x1B42u; *b= 0x1B3Cu; return true;
- /* Chakma */
- case 0x1112Eu : *a = 0x11127u; *b= 0x11131u; return true;
- case 0x1112Fu : *a = 0x11127u; *b= 0x11132u; return true;
-
#if 0
/* Gujarati */
/* This one has no decomposition in Unicode, but needs no decomposition either. */
commit 49ba698124399373cea000d08e0e9fe5fc2396e8
Author: jfkthame <jfkthame at gmail.com>
Date: Wed Dec 28 18:00:51 2016 +0000
[use] Special-case Chakma split-vowel decomp in the USE shaper. (#383)
diff --git a/src/hb-ot-shape-complex-use.cc b/src/hb-ot-shape-complex-use.cc
index 13c7ab3..af68706 100644
--- a/src/hb-ot-shape-complex-use.cc
+++ b/src/hb-ot-shape-complex-use.cc
@@ -559,6 +559,25 @@ reorder (const hb_ot_shape_plan_t *plan,
}
static bool
+decompose_use (const hb_ot_shape_normalize_context_t *c,
+ hb_codepoint_t ab,
+ hb_codepoint_t *a,
+ hb_codepoint_t *b)
+{
+ switch (ab)
+ {
+ /* Chakma:
+ * Special case where the Unicode decomp gives matras in the wrong order
+ * for cluster validation.
+ */
+ case 0x1112Eu : *a = 0x11127u; *b= 0x11131u; return true;
+ case 0x1112Fu : *a = 0x11127u; *b= 0x11132u; return true;
+ }
+
+ return (bool) c->unicode->decompose (ab, a, b);
+}
+
+static bool
compose_use (const hb_ot_shape_normalize_context_t *c,
hb_codepoint_t a,
hb_codepoint_t b,
@@ -582,7 +601,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_use =
NULL, /* preprocess_text */
NULL, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
- NULL, /* decompose */
+ decompose_use,
compose_use,
setup_masks_use,
NULL, /* disable_otl */
More information about the HarfBuzz
mailing list