summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2016-05-06 15:52:27 +0100
committerBehdad Esfahbod <behdad@behdad.org>2016-05-06 15:52:27 +0100
commit30e6e29f0f0f77eb65bfd1c4576b38c2da555017 (patch)
tree3a6afba06f743cf58a530d38cb4ce8bca864e2d9
parentc6ee5f5f06a27a6f147f63aaf51186622821f20b (diff)
downloadharfbuzz-30e6e29f0f0f77eb65bfd1c4576b38c2da555017.tar.gz
[indic/use] Move Javanese from Indic shaper to USE
Fixes https://github.com/behdad/harfbuzz/issues/243 With javatext.ttf, the reodering medial Ra gets its advance width zero'ed in Uniscribe implementation, and the font adds the advance back. Our Indic shaper does not do that, but USE does. So, route Javanese through USE. That's what Microsoft does anyway. Test: U+A9A5,U+A9BA This also seems to fix the following sequence, and variations thereof: U+A99F,U+A9C0,U+A9A2,U+A9BF
-rwxr-xr-xsrc/gen-indic-table.py1
-rw-r--r--src/hb-ot-shape-complex-indic-table.cc23
-rw-r--r--src/hb-ot-shape-complex-private.hh5
-rw-r--r--test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-javanese/misc.txt1
4 files changed, 6 insertions, 24 deletions
diff --git a/src/gen-indic-table.py b/src/gen-indic-table.py
index cc39481c..3016cd07 100755
--- a/src/gen-indic-table.py
+++ b/src/gen-indic-table.py
@@ -26,7 +26,6 @@ ALLOWED_BLOCKS = [
'General Punctuation',
'Superscripts and Subscripts',
'Devanagari Extended',
- 'Javanese',
'Myanmar Extended-B',
'Myanmar Extended-A',
]
diff --git a/src/hb-ot-shape-complex-indic-table.cc b/src/hb-ot-shape-complex-indic-table.cc
index 36157c0e..e5054d18 100644
--- a/src/hb-ot-shape-complex-indic-table.cc
+++ b/src/hb-ot-shape-complex-indic-table.cc
@@ -370,24 +370,9 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {
/* A8E8 */ _(Ca,T), _(Ca,T), _(Ca,T), _(Ca,T), _(Ca,T), _(Ca,T), _(Ca,T), _(Ca,T),
/* A8F0 */ _(Ca,T), _(Ca,T), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x),
-#define indic_offset_0xa980u 1720
+#define indic_offset_0xa9e0u 1720
- /* Javanese */
-
- /* A980 */ _(Bi,T), _(Bi,T),_(CSR,T), _(Vs,R), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
- /* A988 */ _(VI,x), _(C,x), _(C,x), _(C,x), _(VI,x), _(VI,x), _(VI,x), _(C,x),
- /* A990 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x),
- /* A998 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x),
- /* A9A0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x),
- /* A9A8 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x),
- /* A9B0 */ _(C,x), _(C,x), _(C,x), _(N,T), _(M,R), _(M,R), _(M,T), _(M,T),
- /* A9B8 */ _(M,B), _(M,B), _(M,L), _(M,L), _(M,T), _(CS,R), _(CM,R), _(CM,R),
- /* A9C0 */ _(V,BR), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x),
- /* A9C8 */ _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x),
- /* A9D0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x),
- /* A9D8 */ _(Nd,x), _(Nd,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x), _(x,x),
-
/* Myanmar Extended-B */
/* A9E0 */ _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(M,T), _(x,x), _(C,x),
@@ -395,7 +380,7 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {
/* A9F0 */ _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x), _(Nd,x),
/* A9F8 */ _(Nd,x), _(Nd,x), _(C,x), _(C,x), _(C,x), _(C,x), _(C,x), _(x,x),
-#define indic_offset_0xaa60u 1848
+#define indic_offset_0xaa60u 1752
/* Myanmar Extended-A */
@@ -405,7 +390,7 @@ static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {
/* AA70 */ _(x,x), _(C,x), _(C,x), _(C,x), _(x,x), _(x,x), _(x,x), _(x,x),
/* AA78 */ _(x,x), _(x,x), _(C,x), _(TM,R), _(TM,T), _(TM,R), _(C,x), _(C,x),
-}; /* Table items: 1880; occupancy: 70% */
+}; /* Table items: 1784; occupancy: 69% */
INDIC_TABLE_ELEMENT_TYPE
hb_indic_get_categories (hb_codepoint_t u)
@@ -433,7 +418,7 @@ hb_indic_get_categories (hb_codepoint_t u)
case 0xAu:
if (hb_in_range (u, 0xA8E0u, 0xA8F7u)) return indic_table[u - 0xA8E0u + indic_offset_0xa8e0u];
- if (hb_in_range (u, 0xA980u, 0xA9FFu)) return indic_table[u - 0xA980u + indic_offset_0xa980u];
+ if (hb_in_range (u, 0xA9E0u, 0xA9FFu)) return indic_table[u - 0xA9E0u + indic_offset_0xa9e0u];
if (hb_in_range (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u];
break;
diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh
index 36d945ad..fb0c7040 100644
--- a/src/hb-ot-shape-complex-private.hh
+++ b/src/hb-ot-shape-complex-private.hh
@@ -241,9 +241,6 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
/* Unicode-3.0 additions */
case HB_SCRIPT_SINHALA:
- /* Unicode-5.2 additions */
- case HB_SCRIPT_JAVANESE:
-
/* If the designer designed the font for the 'DFLT' script,
* use the default shaper. Otherwise, use the specific shaper.
* Note that for some simple scripts, there may not be *any*
@@ -316,7 +313,7 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
/* Unicode-5.2 additions */
case HB_SCRIPT_EGYPTIAN_HIEROGLYPHS:
- //case HB_SCRIPT_JAVANESE:
+ case HB_SCRIPT_JAVANESE:
case HB_SCRIPT_KAITHI:
case HB_SCRIPT_MEETEI_MAYEK:
case HB_SCRIPT_TAI_THAM:
diff --git a/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-javanese/misc.txt b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-javanese/misc.txt
index 762330ca..16c3d9c3 100644
--- a/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-javanese/misc.txt
+++ b/test/shaping/texts/in-tree/shaper-indic/south-east-asian/script-javanese/misc.txt
@@ -1,4 +1,5 @@
ꦥꦺ
+ꦟ꧀ꦢꦿ
ꦥꦺꦴꦂꦠꦸꦒꦭ꧀
​꧅