From 093cd583263a5d427e3377b31585043fb55d2557 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 23 Jul 2012 14:04:42 -0400 Subject: [PATCH] [Thai] Fix SARA AM handling Oops, thinko. --- src/hb-ot-shape-complex-misc.cc | 6 +++--- src/hb-private.hh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc index 6852d473a..4578f0bf7 100644 --- a/src/hb-ot-shape-complex-misc.cc +++ b/src/hb-ot-shape-complex-misc.cc @@ -151,8 +151,8 @@ _hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map HB_UNUSED, * Nikhahit: U+0E4D U+0ECD * * Testing shows that Uniscribe reorder the following marks: - * Thai: <0E31..0E37,0E47..0E4E> - * Lao: <0EB1..0EB7,0EC7..0ECE> + * Thai: <0E31,0E34..0E37,0E47..0E4E> + * Lao: <0EB1,0EB4..0EB7,0EC7..0ECE> * * Note how the Lao versions are the same as Thai + 0x80. */ @@ -162,7 +162,7 @@ _hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map HB_UNUSED, #define IS_SARA_AM(x) (((x) & ~0x0080) == 0x0E33) #define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0xE33 + 0xE4D) #define SARA_AA_FROM_SARA_AM(x) ((x) - 1) -#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080, 0x0E31, 0x0E37, 0x0E47, 0x0E4E)) +#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080, 0x0E34, 0x0E37, 0x0E47, 0x0E4E, 0x0E31, 0x0E31)) buffer->clear_output (); unsigned int count = buffer->len; diff --git a/src/hb-private.hh b/src/hb-private.hh index 0b9c4efce..ea3254c25 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -730,9 +730,9 @@ hb_in_range (T u, T lo, T hi) } template static inline bool -hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2) +hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3) { - return hb_in_range (u, lo1, hi1) || hb_in_range (u, lo2, hi2); + return hb_in_range (u, lo1, hi1) || hb_in_range (u, lo2, hi2) || hb_in_range (u, lo3, hi3); }