From ee8cf919654cb191e955fe1f89b1ebfb2b8b32ee Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 Jul 2018 16:59:41 -0700 Subject: [PATCH 01/50] [serialize] Remove unused truncate() method --- src/hb-machinery-private.hh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index 653d7c6f2..ff56b1dc9 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -467,12 +467,6 @@ struct hb_serialize_context_t return reinterpret_cast (&obj); } - inline void truncate (void *new_head) - { - assert (this->start < new_head && new_head <= this->head); - this->head = (char *) new_head; - } - unsigned int debug_depth; char *start, *end, *head; bool ran_out_of_room; From 66ccd8ac405c9c25b37de9eb467a7382880dda35 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 Jul 2018 17:03:06 -0700 Subject: [PATCH 02/50] [serialize] Increase stage count from 8 to 32 Indic shaper uses many stages. Now we are provably not limiting functionality whereas the previous limit of 8 was assuming real-world practices. --- src/hb-ot-layout-common-private.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index dec237c8f..1cf530ead 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -45,8 +45,10 @@ /* * The maximum number of times a lookup can be applied during shaping. * Used to limit the number of iterations of the closure algorithm. + * This must be larger than the number of times add_pause() is + * called in a collect_features call of any shaper. */ -#define HB_CLOSURE_MAX_STAGES 8 +#define HB_CLOSURE_MAX_STAGES 32 #endif From b1e5650c67266dc158f22355fed206cd1c413f70 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 01:02:31 -0700 Subject: [PATCH 03/50] [atomic] Make pointer get op relaxed instead of acquire We only use it before cmpexch, so relaxed is fine and faster for common case. --- src/hb-atomic-private.hh | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 02cf6f388..c860582dd 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -40,20 +40,19 @@ /* We need external help for these */ #if defined(hb_atomic_int_impl_add) \ - && defined(hb_atomic_ptr_impl_get) \ && defined(hb_atomic_ptr_impl_cmpexch) /* Defined externally, i.e. in config.h; must have typedef'ed hb_atomic_int_impl_t as well. */ -#elif !defined(HB_NO_MT) && defined(__ATOMIC_ACQUIRE) +#elif !defined(HB_NO_MT) && defined(__ATOMIC_RELAXED) /* C++11-style GCC primitives. */ typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) __atomic_fetch_add (&(AI), (V), __ATOMIC_ACQ_REL) -#define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_ACQUIRE) +#define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_RELAXED) static inline bool _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) { @@ -71,7 +70,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (reinterpret_cast *> (&AI)->fetch_add ((V), std::memory_order_acq_rel)) -#define hb_atomic_ptr_impl_get(P) (reinterpret_cast *> (P)->load (std::memory_order_acquire)) +#define hb_atomic_ptr_impl_get(P) (reinterpret_cast *> (P)->load (std::memory_order_relaxed)) static inline bool _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) { @@ -85,22 +84,9 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #include -/* MinGW has a convoluted history of supporting MemoryBarrier - * properly. As such, define a function to wrap the whole - * thing. */ -static inline void _HBMemoryBarrier (void) { -#if !defined(MemoryBarrier) - long dummy = 0; - InterlockedExchange (&dummy, 1); -#else - MemoryBarrier (); -#endif -} - typedef LONG hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd (&(AI), (V)) -#define hb_atomic_ptr_impl_get(P) (_HBMemoryBarrier (), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O)) @@ -109,7 +95,6 @@ typedef LONG hb_atomic_int_impl_t; typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add (&(AI), (V)) -#define hb_atomic_ptr_impl_get(P) (void *) (__sync_synchronize (), *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) @@ -119,10 +104,9 @@ typedef int hb_atomic_int_impl_t; #include typedef unsigned int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) +#define hb_atomic_int_impl_add(AI, V) (({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) -#define hb_atomic_ptr_impl_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P)) -#define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) (({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) #elif !defined(HB_NO_MT) && defined(__APPLE__) @@ -138,7 +122,6 @@ typedef unsigned int hb_atomic_int_impl_t; typedef int32_t hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), &(AI)) - (V)) -#define hb_atomic_ptr_impl_get(P) (OSMemoryBarrier (), (void *) *(P)) #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) #define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) #else @@ -171,7 +154,6 @@ static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add (&(AI), (V)) -#define hb_atomic_ptr_impl_get(P) (__sync(), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) #elif !defined(HB_NO_MT) @@ -181,7 +163,6 @@ typedef int hb_atomic_int_impl_t; typedef volatile int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) -#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false) @@ -190,13 +171,16 @@ typedef volatile int hb_atomic_int_impl_t; typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) -#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false) #endif +#ifndef hb_atomic_ptr_impl_get +#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) +#endif + #ifndef HB_ATOMIC_INT_INIT #define HB_ATOMIC_INT_INIT(V) {V} #endif From 36d0fbbc52bdf2c71da022fb1fdc31eca17078ce Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 01:15:04 -0700 Subject: [PATCH 04/50] [shaper] Remove a macro --- src/hb-shaper-private.hh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hb-shaper-private.hh b/src/hb-shaper-private.hh index 8f86b4eb5..c93b0e046 100644 --- a/src/hb-shaper-private.hh +++ b/src/hb-shaper-private.hh @@ -60,10 +60,8 @@ struct hb_shaper_data_t { /* Means: succeeded, but don't need to keep any data. */ #define HB_SHAPER_DATA_SUCCEEDED ((void *) +1) - /* Means: tried but failed to create. */ #define HB_SHAPER_DATA_INVALID ((void *) -1) -#define HB_SHAPER_DATA_IS_INVALID(data) ((void *) (data) == HB_SHAPER_DATA_INVALID) #define HB_SHAPER_DATA_TYPE_NAME(shaper, object) hb_##shaper##_shaper_##object##_data_t #define HB_SHAPER_DATA_TYPE(shaper, object) struct HB_SHAPER_DATA_TYPE_NAME(shaper, object) @@ -121,7 +119,7 @@ HB_SHAPER_DATA_ENSURE_FUNC(shaper, object) (hb_##object##_t *object) \ goto retry; \ } \ } \ - return data != nullptr && !HB_SHAPER_DATA_IS_INVALID (data); \ + return data != nullptr && (void *) data != HB_SHAPER_DATA_INVALID; \ } From f5152cea423947cd8a85332566443b4e2e091672 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 01:27:04 -0700 Subject: [PATCH 05/50] [shaper] Move code around --- src/hb-shaper-private.hh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/hb-shaper-private.hh b/src/hb-shaper-private.hh index c93b0e046..4bd36b5ba 100644 --- a/src/hb-shaper-private.hh +++ b/src/hb-shaper-private.hh @@ -49,15 +49,6 @@ HB_INTERNAL const hb_shaper_pair_t * _hb_shapers_get (void); -/* For embedding in face / font / ... */ -struct hb_shaper_data_t { -#define HB_SHAPER_IMPLEMENT(shaper) void *shaper; -#include "hb-shaper-list.hh" -#undef HB_SHAPER_IMPLEMENT -}; - -#define HB_SHAPERS_COUNT (sizeof (hb_shaper_data_t) / sizeof (void *)) - /* Means: succeeded, but don't need to keep any data. */ #define HB_SHAPER_DATA_SUCCEEDED ((void *) +1) /* Means: tried but failed to create. */ @@ -123,4 +114,13 @@ HB_SHAPER_DATA_ENSURE_FUNC(shaper, object) (hb_##object##_t *object) \ } +/* For embedding in face / font / ... */ +struct hb_shaper_data_t { +#define HB_SHAPER_IMPLEMENT(shaper) void *shaper; +#include "hb-shaper-list.hh" +#undef HB_SHAPER_IMPLEMENT +}; +#define HB_SHAPERS_COUNT (sizeof (hb_shaper_data_t) / sizeof (void *)) + + #endif /* HB_SHAPER_PRIVATE_HH */ From 1a96cc825dc9c8e3b6eef1403fe0864a1cfc0245 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 11:45:32 -0700 Subject: [PATCH 06/50] [khmer] Rewrite most of shaper to better follow spec Khmer spec has only one reordering phase, and only simple prebase matra and Coeng-Ro reordering. Implement that. Specifically, this was done to address recognizing different orders of the matra and Coeng-Ro sequence. That said, some combinations are now reordered differently from Uniscribe. Not clear if that's intended or a bug in Uniscribe. The following two sequences render the same in Uniscribe whereas we reorder them differently: U+17A0,U+17D2,U+179A,U+17C2 U+17A0,U+17C2,U+17D2,U+179A For that reason, our test suite numbers regressed slightly. Used to be at 34 for fails, now at: KHMER: 299080 out of 299124 tests passed. 44 failed (0.0147096%) But generally a good change, and removed lots of code. Fixes https://github.com/harfbuzz/harfbuzz/issues/1026 --- src/hb-ot-shape-complex-indic-private.hh | 4 +- src/hb-ot-shape-complex-khmer.cc | 460 +++-------------------- src/hb-ot-shape-complex-private.hh | 13 - 3 files changed, 64 insertions(+), 413 deletions(-) diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh index 9554994a0..bb7fff384 100644 --- a/src/hb-ot-shape-complex-indic-private.hh +++ b/src/hb-ot-shape-complex-indic-private.hh @@ -300,7 +300,9 @@ static const hb_codepoint_t ra_chars[] = { 0x0CB0u, /* Kannada */ 0x0D30u, /* Malayalam */ /* No Reph, Logical Repha */ - 0x0DBBu, /* Sinhala */ /* Reph formed only with ZWJ */ + 0x0DBBu, /* Sinhala */ /* Reph formed only with ZWJ */ + + 0x179Au, /* Khmer */ }; static inline bool diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index 7876d3666..ba5b64e90 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -42,7 +42,7 @@ khmer_features[] = { /* * Basic features. - * These features are applied in order, one at a time, after initial_reordering. + * These features are applied in order, one at a time, after reordering. */ {HB_TAG('p','r','e','f'), F_NONE}, {HB_TAG('b','l','w','f'), F_NONE}, @@ -51,9 +51,7 @@ khmer_features[] = {HB_TAG('c','f','a','r'), F_NONE}, /* * Other features. - * These features are applied all at once, after final_reordering. - * Default Bengali font in Windows for example has intermixed - * lookups for init,pres,abvs,blws features. + * These features are applied all at once. */ {HB_TAG('p','r','e','s'), F_GLOBAL}, {HB_TAG('a','b','v','s'), F_GLOBAL}, @@ -92,13 +90,9 @@ setup_syllables (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer); static void -initial_reordering (const hb_ot_shape_plan_t *plan, - hb_font_t *font, - hb_buffer_t *buffer); -static void -final_reordering (const hb_ot_shape_plan_t *plan, - hb_font_t *font, - hb_buffer_t *buffer); +reorder (const hb_ot_shape_plan_t *plan, + hb_font_t *font, + hb_buffer_t *buffer); static void clear_syllables (const hb_ot_shape_plan_t *plan, hb_font_t *font, @@ -119,12 +113,11 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) unsigned int i = 0; - map->add_gsub_pause (initial_reordering); + map->add_gsub_pause (reorder); for (; i < KHMER_BASIC_FEATURES; i++) { map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); map->add_gsub_pause (nullptr); } - map->add_gsub_pause (final_reordering); for (; i < KHMER_NUM_FEATURES; i++) { map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); } @@ -264,162 +257,58 @@ setup_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED, buffer->unsafe_to_break (start, end); } -static int -compare_khmer_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb) -{ - int a = pa->khmer_position(); - int b = pb->khmer_position(); - - return a < b ? -1 : a == b ? 0 : +1; -} - /* Rules from: * https://docs.microsoft.com/en-us/typography/script-development/devanagari */ static void -initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, - hb_face_t *face, - hb_buffer_t *buffer, - unsigned int start, unsigned int end) +reorder_consonant_syllable (const hb_ot_shape_plan_t *plan, + hb_face_t *face, + hb_buffer_t *buffer, + unsigned int start, unsigned int end) { const khmer_shape_plan_t *khmer_plan = (const khmer_shape_plan_t *) plan->data; hb_glyph_info_t *info = buffer->info; - /* 1. Khmer shaping assumes that a syllable will begin with a Cons, IndV, or Number. */ - - /* The first consonant is always the base. */ - unsigned int base = start; - info[base].khmer_position() = POS_BASE_C; - - /* Mark all subsequent consonants as below. */ - for (unsigned int i = base + 1; i < end; i++) - if (is_consonant_or_vowel (info[i])) - info[i].khmer_position() = POS_BELOW_C; - - /* Mark final consonants. A final consonant is one appearing after a matra, - * like in Khmer. */ - for (unsigned int i = base + 1; i < end; i++) - if (info[i].khmer_category() == OT_M) { - for (unsigned int j = i + 1; j < end; j++) - if (is_consonant_or_vowel (info[j])) { - info[j].khmer_position() = POS_FINAL_C; - break; - } - break; - } - - /* Attach misc marks to previous char to move with them. */ + /* Setup masks. */ { - khmer_position_t last_pos = POS_START; - for (unsigned int i = start; i < end; i++) - { - if ((FLAG_UNSAFE (info[i].khmer_category()) & (JOINER_FLAGS | FLAG (OT_N) | FLAG (OT_RS) | MEDIAL_FLAGS | FLAG (OT_Coeng)))) - { - info[i].khmer_position() = last_pos; - if (unlikely (info[i].khmer_category() == OT_Coeng && - info[i].khmer_position() == POS_PRE_M)) - { - /* - * Uniscribe doesn't move the Halant with Left Matra. - * TEST: U+092B,U+093F,U+094DE - * We follow. This is important for the Sinhala - * U+0DDA split matra since it decomposes to U+0DD9,U+0DCA - * where U+0DD9 is a left matra and U+0DCA is the virama. - * We don't want to move the virama with the left matra. - * TEST: U+0D9A,U+0DDA - */ - for (unsigned int j = i; j > start; j--) - if (info[j - 1].khmer_position() != POS_PRE_M) { - info[i].khmer_position() = info[j - 1].khmer_position(); - break; - } - } - } else if (info[i].khmer_position() != POS_SMVD) { - last_pos = (khmer_position_t) info[i].khmer_position(); - } - } - } - /* For post-base consonants let them own anything before them - * since the last consonant or matra. */ - { - unsigned int last = base; - for (unsigned int i = base + 1; i < end; i++) - if (is_consonant_or_vowel (info[i])) - { - for (unsigned int j = last + 1; j < i; j++) - if (info[j].khmer_position() < POS_SMVD) - info[j].khmer_position() = info[i].khmer_position(); - last = i; - } else if (info[i].khmer_category() == OT_M) - last = i; - } - - { - /* Use syllable() for sort accounting temporarily. */ - unsigned int syllable = info[start].syllable(); - for (unsigned int i = start; i < end; i++) - info[i].syllable() = i - start; - - /* Sit tight, rock 'n roll! */ - hb_stable_sort (info + start, end - start, compare_khmer_order); - /* Find base again */ - base = end; - for (unsigned int i = start; i < end; i++) - if (info[i].khmer_position() == POS_BASE_C) - { - base = i; - break; - } - - if (unlikely (end - start >= 127)) - buffer->merge_clusters (start, end); - else - /* Note! syllable() is a one-byte field. */ - for (unsigned int i = base; i < end; i++) - if (info[i].syllable() != 255) - { - unsigned int max = i; - unsigned int j = start + info[i].syllable(); - while (j != i) - { - max = MAX (max, j); - unsigned int next = start + info[j].syllable(); - info[j].syllable() = 255; /* So we don't process j later again. */ - j = next; - } - if (i != max) - buffer->merge_clusters (i, max + 1); - } - - /* Put syllable back in. */ - for (unsigned int i = start; i < end; i++) - info[i].syllable() = syllable; - } - - /* Setup masks now */ - - { - hb_mask_t mask; - /* Post-base */ - mask = khmer_plan->mask_array[BLWF] | khmer_plan->mask_array[ABVF] | khmer_plan->mask_array[PSTF]; - for (unsigned int i = base + 1; i < end; i++) + hb_mask_t mask = khmer_plan->mask_array[BLWF] | khmer_plan->mask_array[ABVF] | khmer_plan->mask_array[PSTF]; + for (unsigned int i = start + 1; i < end; i++) info[i].mask |= mask; } - unsigned int pref_len = 2; - if (khmer_plan->mask_array[PREF] && base + pref_len < end) + unsigned int num_coengs = 0; + for (unsigned int i = start + 1; i < end; i++) { - /* Find a Halant,Ra sequence and mark it for pre-base-reordering processing. */ - for (unsigned int i = base + 1; i + pref_len - 1 < end; i++) { - hb_codepoint_t glyphs[2]; - for (unsigned int j = 0; j < pref_len; j++) - glyphs[j] = info[i + j].codepoint; - if (khmer_plan->pref.would_substitute (glyphs, pref_len, face)) + /* """ + * When a COENG + (Cons | IndV) combination are found (and subscript count + * is less than two) the character combination is handled according to the + * subscript type of the character following the COENG. + * + * ... + * + * Subscript Type 2 - The COENG + RO characters are reordered to immediately + * before the base glyph. Then the COENG + RO characters are assigned to have + * the 'pref' OpenType feature applied to them. + * """ + */ + if (info[i].khmer_category() == OT_Coeng && num_coengs <= 2 && i + 1 < end) + { + num_coengs++; + + if (info[i + 1].khmer_category() == OT_Ra) { - for (unsigned int j = 0; j < pref_len; j++) - info[i++].mask |= khmer_plan->mask_array[PREF]; + for (unsigned int j = 0; j < 2; j++) + info[i + j].mask |= khmer_plan->mask_array[PREF]; + + /* Move the Coeng,Ro sequence to the start. */ + buffer->merge_clusters (start, i + 2); + hb_glyph_info_t t0 = info[i]; + hb_glyph_info_t t1 = info[i + 1]; + memmove (&info[start + 2], &info[start], (i - start) * sizeof (info[0])); + info[start] = t0; + info[start + 1] = t1; /* Mark the subsequent stuff with 'cfar'. Used in Khmer. * Read the feature spec. @@ -428,12 +317,22 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, * U+1784,U+17D2,U+1782,U+17D2,U+179A */ if (khmer_plan->mask_array[CFAR]) - for (; i < end; i++) - info[i].mask |= khmer_plan->mask_array[CFAR]; + for (unsigned int j = i + 2; j < end; j++) + info[j].mask |= khmer_plan->mask_array[CFAR]; - break; + num_coengs = 2; /* Done. */ } } + + /* Reorder left matra piece. */ + else if (info[i].khmer_position() == POS_PRE_M) + { + /* Move to the start. */ + buffer->merge_clusters (start, i + 1); + hb_glyph_info_t t = info[i]; + memmove (&info[start + 1], &info[start], (i - start) * sizeof (info[0])); + info[start] = t; + } } } @@ -448,7 +347,7 @@ initial_reordering_syllable (const hb_ot_shape_plan_t *plan, { case broken_cluster: /* We already inserted dotted-circles, so just call the consonant_syllable. */ case consonant_syllable: - initial_reordering_consonant_syllable (plan, face, buffer, start, end); + reorder_consonant_syllable (plan, face, buffer, start, end); break; case non_khmer_cluster: @@ -518,263 +417,26 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED, } static void -initial_reordering (const hb_ot_shape_plan_t *plan, - hb_font_t *font, - hb_buffer_t *buffer) +reorder (const hb_ot_shape_plan_t *plan, + hb_font_t *font, + hb_buffer_t *buffer) { insert_dotted_circles (plan, font, buffer); foreach_syllable (buffer, start, end) initial_reordering_syllable (plan, font->face, buffer, start, end); -} - -static void -final_reordering_syllable (const hb_ot_shape_plan_t *plan, - hb_buffer_t *buffer, - unsigned int start, unsigned int end) -{ - const khmer_shape_plan_t *khmer_plan = (const khmer_shape_plan_t *) plan->data; - hb_glyph_info_t *info = buffer->info; - - - /* This function relies heavily on halant glyphs. Lots of ligation - * and possibly multiple substitutions happened prior to this - * phase, and that might have messed up our properties. Recover - * from a particular case of that where we're fairly sure that a - * class of OT_Coeng is desired but has been lost. */ - if (khmer_plan->virama_glyph) - { - unsigned int virama_glyph = khmer_plan->virama_glyph; - for (unsigned int i = start; i < end; i++) - if (info[i].codepoint == virama_glyph && - _hb_glyph_info_ligated (&info[i]) && - _hb_glyph_info_multiplied (&info[i])) - { - /* This will make sure that this glyph passes is_coeng() test. */ - info[i].khmer_category() = OT_Coeng; - _hb_glyph_info_clear_ligated_and_multiplied (&info[i]); - } - } - - - /* 4. Final reordering: - * - * After the localized forms and basic shaping forms GSUB features have been - * applied (see below), the shaping engine performs some final glyph - * reordering before applying all the remaining font features to the entire - * syllable. - */ - - bool try_pref = !!khmer_plan->mask_array[PREF]; - - /* Find base again */ - unsigned int base; - for (base = start; base < end; base++) - if (info[base].khmer_position() >= POS_BASE_C) - { - if (try_pref && base + 1 < end) - { - for (unsigned int i = base + 1; i < end; i++) - if ((info[i].mask & khmer_plan->mask_array[PREF]) != 0) - { - if (!(_hb_glyph_info_substituted (&info[i]) && - _hb_glyph_info_ligated_and_didnt_multiply (&info[i]))) - { - /* Ok, this was a 'pref' candidate but didn't form any. - * Base is around here... */ - base = i; - while (base < end && is_coeng (info[base])) - base++; - info[base].khmer_position() = POS_BASE_C; - - try_pref = false; - } - break; - } - } - - if (start < base && info[base].khmer_position() > POS_BASE_C) - base--; - break; - } - if (base == end && start < base && - is_one_of (info[base - 1], FLAG (OT_ZWJ))) - base--; - if (base < end) - while (start < base && - is_one_of (info[base], (FLAG (OT_N) | FLAG (OT_Coeng)))) - base--; - - - /* o Reorder matras: - * - * If a pre-base matra character had been reordered before applying basic - * features, the glyph can be moved closer to the main consonant based on - * whether half-forms had been formed. Actual position for the matra is - * defined as “after last standalone halant glyph, after initial matra - * position and before the main consonant”. If ZWJ or ZWNJ follow this - * halant, position is moved after it. - */ - - if (start + 1 < end && start < base) /* Otherwise there can't be any pre-base matra characters. */ - { - /* If we lost track of base, alas, position before last thingy. */ - unsigned int new_pos = base == end ? base - 2 : base - 1; - - while (new_pos > start && - !(is_one_of (info[new_pos], (FLAG (OT_M) | FLAG (OT_Coeng))))) - new_pos--; - - /* If we found no Halant we are done. - * Otherwise only proceed if the Halant does - * not belong to the Matra itself! */ - if (is_coeng (info[new_pos]) && - info[new_pos].khmer_position() != POS_PRE_M) - { - /* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */ - if (new_pos + 1 < end && is_joiner (info[new_pos + 1])) - new_pos++; - } - else - new_pos = start; /* No move. */ - - if (start < new_pos && info[new_pos].khmer_position () != POS_PRE_M) - { - /* Now go see if there's actually any matras... */ - for (unsigned int i = new_pos; i > start; i--) - if (info[i - 1].khmer_position () == POS_PRE_M) - { - unsigned int old_pos = i - 1; - if (old_pos < base && base <= new_pos) /* Shouldn't actually happen. */ - base--; - - hb_glyph_info_t tmp = info[old_pos]; - memmove (&info[old_pos], &info[old_pos + 1], (new_pos - old_pos) * sizeof (info[0])); - info[new_pos] = tmp; - - /* Note: this merge_clusters() is intentionally *after* the reordering. - * Indic matra reordering is special and tricky... */ - buffer->merge_clusters (new_pos, MIN (end, base + 1)); - - new_pos--; - } - } else { - for (unsigned int i = start; i < base; i++) - if (info[i].khmer_position () == POS_PRE_M) { - buffer->merge_clusters (i, MIN (end, base + 1)); - break; - } - } - } - - - /* o Reorder pre-base-reordering consonants: - * - * If a pre-base-reordering consonant is found, reorder it according to - * the following rules: - */ - - if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base-reordering Ra. */ - { - for (unsigned int i = base + 1; i < end; i++) - if ((info[i].mask & khmer_plan->mask_array[PREF]) != 0) - { - /* 1. Only reorder a glyph produced by substitution during application - * of the feature. (Note that a font may shape a Ra consonant with - * the feature generally but block it in certain contexts.) - */ - /* Note: We just check that something got substituted. We don't check that - * the feature actually did it... - * - * Reorder pref only if it ligated. */ - if (_hb_glyph_info_ligated_and_didnt_multiply (&info[i])) - { - /* - * 2. Try to find a target position the same way as for pre-base matra. - * If it is found, reorder pre-base consonant glyph. - * - * 3. If position is not found, reorder immediately before main - * consonant. - */ - - unsigned int new_pos = base; - while (new_pos > start && - !(is_one_of (info[new_pos - 1], FLAG(OT_M) | FLAG (OT_Coeng)))) - new_pos--; - - /* In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a - * split matra, it should be reordered to *before* the left part of such matra. */ - if (new_pos > start && info[new_pos - 1].khmer_category() == OT_M) - { - unsigned int old_pos = i; - for (unsigned int j = base + 1; j < old_pos; j++) - if (info[j].khmer_category() == OT_M) - { - new_pos--; - break; - } - } - - if (new_pos > start && is_coeng (info[new_pos - 1])) - { - /* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */ - if (new_pos < end && is_joiner (info[new_pos])) - new_pos++; - } - - { - unsigned int old_pos = i; - - buffer->merge_clusters (new_pos, old_pos + 1); - hb_glyph_info_t tmp = info[old_pos]; - memmove (&info[new_pos + 1], &info[new_pos], (old_pos - new_pos) * sizeof (info[0])); - info[new_pos] = tmp; - - if (new_pos <= base && base < old_pos) - base++; - } - } - - break; - } - } - - - /* - * Finish off the clusters and go home! - */ - if (hb_options ().uniscribe_bug_compatible) - { - /* Uniscribe merges the entire syllable into a single cluster... Except for Tamil & Sinhala. - * This means, half forms are submerged into the main consonant's cluster. - * This is unnecessary, and makes cursor positioning harder, but that's what - * Uniscribe does. */ - buffer->merge_clusters (start, end); - } -} - - -static void -final_reordering (const hb_ot_shape_plan_t *plan, - hb_font_t *font HB_UNUSED, - hb_buffer_t *buffer) -{ - unsigned int count = buffer->len; - if (unlikely (!count)) return; - - foreach_syllable (buffer, start, end) - final_reordering_syllable (plan, buffer, start, end); HB_BUFFER_DEALLOCATE_VAR (buffer, khmer_category); HB_BUFFER_DEALLOCATE_VAR (buffer, khmer_position); } - static void clear_syllables (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font HB_UNUSED, hb_buffer_t *buffer) { + /* TODO: In USE, we clear syllables right after reorder. Figure out + * what Uniscribe does. */ hb_glyph_info_t *info = buffer->info; unsigned int count = buffer->len; for (unsigned int i = 0; i < count; i++) diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh index ed6849bfa..37a4d918b 100644 --- a/src/hb-ot-shape-complex-private.hh +++ b/src/hb-ot-shape-complex-private.hh @@ -279,20 +279,7 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) return &_hb_ot_complex_shaper_indic; case HB_SCRIPT_KHMER: - /* A number of Khmer fonts in the wild don't have a 'pref' feature, - * and as such won't shape properly via the Indic shaper; - * however, they typically have 'liga' / 'clig' features that implement - * the necessary "reordering" by means of ligature substitutions. - * So we send such pref-less fonts through the generic shaper instead. */ - if (planner->map.found_script[0] && - hb_ot_layout_language_find_feature (planner->face, HB_OT_TAG_GSUB, - planner->map.script_index[0], - planner->map.language_index[0], - HB_TAG ('p','r','e','f'), - nullptr)) return &_hb_ot_complex_shaper_khmer; - else - return &_hb_ot_complex_shaper_default; case HB_SCRIPT_MYANMAR: if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','2')) From 7c658ea2f20a77cac35e8988e54316425396198a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 12:49:02 -0700 Subject: [PATCH 07/50] [khmer] Apply ccmp after basic features Part of https://github.com/harfbuzz/harfbuzz/issues/974 --- src/hb-ot-shape-complex-khmer.cc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index ba5b64e90..a5f357a59 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -105,23 +105,35 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) /* Do this before any lookups have been applied. */ map->add_gsub_pause (setup_syllables); + map->add_gsub_pause (reorder); map->add_global_bool_feature (HB_TAG('l','o','c','l')); - /* The Indic specs do not require ccmp, but we apply it here since if - * there is a use of it, it's typically at the beginning. */ - map->add_global_bool_feature (HB_TAG('c','c','m','p')); - + map->add_gsub_pause (nullptr); unsigned int i = 0; - map->add_gsub_pause (reorder); for (; i < KHMER_BASIC_FEATURES; i++) { map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); map->add_gsub_pause (nullptr); } + + /* Testing suggests that Uniscribe applies 'ccmp' here, NOT before + * the basic features. Test with KhmerUI.ttf and the following + * three sequences: + * + * U+1789,U+17BC + * U+1789,U+17D2,U+1789 + * U+1789,U+17D2,U+1789,U+17BC + * + * https://github.com/harfbuzz/harfbuzz/issues/974 + */ + map->add_global_bool_feature (HB_TAG('c','c','m','p')); + map->add_gsub_pause (nullptr); + for (; i < KHMER_NUM_FEATURES; i++) { map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); } + map->add_global_bool_feature (HB_TAG('c','a','l','t')); map->add_global_bool_feature (HB_TAG('c','l','i','g')); From 8eef1964a708c3db52e5e7312689c4664afa9839 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 13:35:10 -0700 Subject: [PATCH 08/50] [khmer] Revert previous change, and remove pauses This makes test suite happy again (at 44) while fixing the sequences we were fixing, which were the following with KhmerUI.ttf: U+1789,U+17BC U+1789,U+17D2,U+1789 U+1789,U+17D2,U+1789,U+17BC Fixes rest of https://github.com/harfbuzz/harfbuzz/issues/974 --- src/hb-ot-shape-complex-khmer.cc | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index a5f357a59..1a155a16c 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -107,18 +107,9 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) map->add_gsub_pause (setup_syllables); map->add_gsub_pause (reorder); - map->add_global_bool_feature (HB_TAG('l','o','c','l')); - map->add_gsub_pause (nullptr); - - unsigned int i = 0; - for (; i < KHMER_BASIC_FEATURES; i++) { - map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); - map->add_gsub_pause (nullptr); - } - - /* Testing suggests that Uniscribe applies 'ccmp' here, NOT before - * the basic features. Test with KhmerUI.ttf and the following - * three sequences: + /* Testing suggests that Uniscribe does NOT before between basic + * features. Test with KhmerUI.ttf and the following three + * sequences: * * U+1789,U+17BC * U+1789,U+17D2,U+1789 @@ -126,14 +117,20 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) * * https://github.com/harfbuzz/harfbuzz/issues/974 */ + map->add_global_bool_feature (HB_TAG('l','o','c','l')); map->add_global_bool_feature (HB_TAG('c','c','m','p')); + + unsigned int i = 0; + for (; i < KHMER_BASIC_FEATURES; i++) { + map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); + } + map->add_gsub_pause (nullptr); for (; i < KHMER_NUM_FEATURES; i++) { map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); } - map->add_global_bool_feature (HB_TAG('c','a','l','t')); map->add_global_bool_feature (HB_TAG('c','l','i','g')); From 6ddd669e205cf2c1c3b0a362330b686386f68519 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 13:38:07 -0700 Subject: [PATCH 09/50] [khmer] Clear syllables before presentation features Probably not what Uniscribe does, but good idea? --- src/hb-ot-shape-complex-khmer.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index 1a155a16c..582360397 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -125,7 +125,7 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); } - map->add_gsub_pause (nullptr); + map->add_gsub_pause (clear_syllables); for (; i < KHMER_NUM_FEATURES; i++) { map->add_feature (khmer_features[i].tag, 1, khmer_features[i].flags | F_MANUAL_ZWJ | F_MANUAL_ZWNJ); @@ -134,7 +134,6 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) map->add_global_bool_feature (HB_TAG('c','a','l','t')); map->add_global_bool_feature (HB_TAG('c','l','i','g')); - map->add_gsub_pause (clear_syllables); } static void From df26a32c8fd22cbd486e2a1014d30b9f38f51cd1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 13:55:53 -0700 Subject: [PATCH 10/50] [test] Move things around for shaper updates --- .../shaper-indic/{indic => }/script-assamese/utrrs/LICENSE | 0 .../shaper-indic/{indic => }/script-assamese/utrrs/README | 0 .../shaper-indic/{indic => }/script-assamese/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-assamese/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../script-assamese/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 0 .../script-assamese/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../shaper-indic/{indic => }/script-bengali/misc/misc.txt | 0 .../shaper-indic/{indic => }/script-bengali/misc/reph.txt | 0 .../shaper-indic/{indic => }/script-bengali/utrrs/LICENSE | 0 .../in-house/shaper-indic/{indic => }/script-bengali/utrrs/README | 0 .../shaper-indic/{indic => }/script-bengali/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-bengali/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../script-bengali/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 0 .../script-bengali/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../{indic => }/script-devanagari/misc/dottedcircle.txt | 0 .../shaper-indic/{indic => }/script-devanagari/misc/eyelash.txt | 0 .../shaper-indic/{indic => }/script-devanagari/misc/joiners.txt | 0 .../shaper-indic/{indic => }/script-devanagari/misc/misc.txt | 0 .../{indic => }/script-devanagari/misc/spec-deviations.txt | 0 .../{indic => }/script-devanagari/misc/tricky-reordering.txt | 0 .../shaper-indic/{indic => }/script-devanagari/utrrs/LICENSE | 0 .../shaper-indic/{indic => }/script-devanagari/utrrs/README | 0 .../shaper-indic/{indic => }/script-devanagari/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../IndicFontFeatureCodepoint-DevnagariSpecificAddition.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-GenericPunctuation.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 0 .../script-devanagari/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../shaper-indic/{indic => }/script-gujarati/utrrs/LICENSE | 0 .../shaper-indic/{indic => }/script-gujarati/utrrs/README | 0 .../shaper-indic/{indic => }/script-gujarati/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 0 .../script-gujarati/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../shaper-indic/{indic => }/script-gurmukhi/misc/misc.txt | 0 .../shaper-indic/{indic => }/script-gurmukhi/utrrs/LICENSE | 0 .../shaper-indic/{indic => }/script-gurmukhi/utrrs/README | 0 .../shaper-indic/{indic => }/script-gurmukhi/utrrs/SOURCES | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-GurmukhiSpecific.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 0 .../script-gurmukhi/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../shaper-indic/{indic => }/script-kannada/misc/misc.txt | 0 .../shaper-indic/{indic => }/script-kannada/misc/right-matras.txt | 0 .../shaper-indic/{indic => }/script-kannada/utrrs/LICENSE | 0 .../in-house/shaper-indic/{indic => }/script-kannada/utrrs/README | 0 .../shaper-indic/{indic => }/script-kannada/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-kannada/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../script-kannada/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../shaper-indic/{indic => }/script-malayalam/misc/cibu.txt | 0 .../shaper-indic/{indic => }/script-malayalam/misc/dot-reph.txt | 0 .../shaper-indic/{indic => }/script-malayalam/misc/misc.txt | 0 .../shaper-indic/{indic => }/script-malayalam/utrrs/LICENSE | 0 .../shaper-indic/{indic => }/script-malayalam/utrrs/README | 0 .../shaper-indic/{indic => }/script-malayalam/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-malayalam/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../in-house/shaper-indic/{indic => }/script-oriya/misc/bindu.txt | 0 .../in-house/shaper-indic/{indic => }/script-oriya/misc/misc.txt | 0 .../in-house/shaper-indic/{indic => }/script-oriya/utrrs/LICENSE | 0 .../in-house/shaper-indic/{indic => }/script-oriya/utrrs/README | 0 .../in-house/shaper-indic/{indic => }/script-oriya/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-OriyaSpecific.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../{indic => }/script-oriya/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../shaper-indic/{indic => }/script-sinhala/misc/extensive.txt | 0 .../shaper-indic/{indic => }/script-sinhala/misc/misc.txt | 0 .../shaper-indic/{indic => }/script-sinhala/misc/reph.txt | 0 .../shaper-indic/{indic => }/script-sinhala/misc/split-matras.txt | 0 .../shaper-indic/{indic => }/script-sinhala/utrrs/LICENSE | 0 .../in-house/shaper-indic/{indic => }/script-sinhala/utrrs/README | 0 .../shaper-indic/{indic => }/script-sinhala/utrrs/SOURCES | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Punctuation.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-sinhala/utrrs/gpos/IndicFontFeatureGPOS.txt | 0 .../script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt | 0 .../utrrs/gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt | 0 .../script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt | 0 .../utrrs/gsub/IndicFontFeatureGSUB-Special-Cases.txt | 0 .../utrrs/gsub/IndicFontFeatureGSUB-TouchingLetters.txt | 0 .../script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt | 0 .../script-sinhala/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../in-house/shaper-indic/{indic => }/script-tamil/misc/misc.txt | 0 .../in-house/shaper-indic/{indic => }/script-tamil/utrrs/LICENSE | 0 .../in-house/shaper-indic/{indic => }/script-tamil/utrrs/README | 0 .../in-house/shaper-indic/{indic => }/script-tamil/utrrs/SOURCES | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-CurrencySymbols.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Numerics.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Symbols.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-TamilSymbol.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-tamil/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../script-tamil/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt | 0 .../{indic => }/script-tamil/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../in-house/shaper-indic/{indic => }/script-telugu/misc/misc.txt | 0 .../in-house/shaper-indic/{indic => }/script-telugu/utrrs/LICENSE | 0 .../in-house/shaper-indic/{indic => }/script-telugu/utrrs/README | 0 .../in-house/shaper-indic/{indic => }/script-telugu/utrrs/SOURCES | 0 .../codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt | 0 .../codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt | 0 .../utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt | 0 .../script-telugu/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt | 0 .../{indic => }/script-telugu/utrrs/gsub/IndicFontFeatureGSUB.txt | 0 .../south-east-asian/script-khmer/misc => shaper-khmer}/misc.txt | 0 .../script-khmer/misc => shaper-khmer}/other-marks-invalid.txt | 0 .../script-khmer/misc => shaper-khmer}/other-marks.txt | 0 .../south-east-asian => shaper-use}/script-javanese/misc.txt | 0 174 files changed, 0 insertions(+), 0 deletions(-) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-assamese/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/misc/reph.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-bengali/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/misc/dottedcircle.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/misc/eyelash.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/misc/joiners.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/misc/spec-deviations.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/misc/tricky-reordering.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DevnagariSpecificAddition.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-GenericPunctuation.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-devanagari/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gujarati/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-GurmukhiSpecific.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-gurmukhi/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/misc/right-matras.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-kannada/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/misc/cibu.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/misc/dot-reph.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-malayalam/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/misc/bindu.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-OriyaSpecific.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-oriya/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/misc/extensive.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/misc/reph.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/misc/split-matras.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Punctuation.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gpos/IndicFontFeatureGPOS.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Special-Cases.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-TouchingLetters.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-CurrencySymbols.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Numerics.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Symbols.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-TamilSymbol.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-tamil/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/misc/misc.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/LICENSE (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/README (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/SOURCES (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt (100%) rename test/shaping/texts/in-house/shaper-indic/{indic => }/script-telugu/utrrs/gsub/IndicFontFeatureGSUB.txt (100%) rename test/shaping/texts/in-house/{shaper-indic/south-east-asian/script-khmer/misc => shaper-khmer}/misc.txt (100%) rename test/shaping/texts/in-house/{shaper-indic/south-east-asian/script-khmer/misc => shaper-khmer}/other-marks-invalid.txt (100%) rename test/shaping/texts/in-house/{shaper-indic/south-east-asian/script-khmer/misc => shaper-khmer}/other-marks.txt (100%) rename test/shaping/texts/in-house/{shaper-indic/south-east-asian => shaper-use}/script-javanese/misc.txt (100%) diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-assamese/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-assamese/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/misc/reph.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/misc/reph.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/misc/reph.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/misc/reph.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-bengali/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-bengali/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/dottedcircle.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/dottedcircle.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/dottedcircle.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/dottedcircle.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/eyelash.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/eyelash.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/eyelash.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/eyelash.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/joiners.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/joiners.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/joiners.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/joiners.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/spec-deviations.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/spec-deviations.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/spec-deviations.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/spec-deviations.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/tricky-reordering.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/tricky-reordering.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/misc/tricky-reordering.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/misc/tricky-reordering.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DevnagariSpecificAddition.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DevnagariSpecificAddition.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DevnagariSpecificAddition.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-DevnagariSpecificAddition.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-GenericPunctuation.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-GenericPunctuation.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-GenericPunctuation.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-GenericPunctuation.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-devanagari/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-devanagari/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gujarati/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-gujarati/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-GurmukhiSpecific.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-GurmukhiSpecific.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-GurmukhiSpecific.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-GurmukhiSpecific.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-gurmukhi/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-gurmukhi/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/misc/right-matras.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/misc/right-matras.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/misc/right-matras.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/misc/right-matras.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-kannada/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-kannada/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/misc/cibu.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/misc/cibu.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/misc/cibu.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/misc/cibu.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/misc/dot-reph.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/misc/dot-reph.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/misc/dot-reph.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/misc/dot-reph.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-malayalam/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-malayalam/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/misc/bindu.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/misc/bindu.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/misc/bindu.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/misc/bindu.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalConsonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-OriyaSpecific.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-OriyaSpecific.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-OriyaSpecific.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-OriyaSpecific.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-oriya/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-oriya/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/extensive.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/extensive.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/extensive.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/extensive.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/reph.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/reph.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/reph.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/reph.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/split-matras.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/split-matras.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/misc/split-matras.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/misc/split-matras.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Punctuation.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Punctuation.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Punctuation.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-Punctuation.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gpos/IndicFontFeatureGPOS.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gpos/IndicFontFeatureGPOS.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gpos/IndicFontFeatureGPOS.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gpos/IndicFontFeatureGPOS.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Conjunct.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Rakaaraansaya.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Repaya.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Special-Cases.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Special-Cases.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Special-Cases.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Special-Cases.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-TouchingLetters.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-TouchingLetters.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-TouchingLetters.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-TouchingLetters.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB-Yansaya.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-sinhala/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-CurrencySymbols.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-CurrencySymbols.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-CurrencySymbols.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-CurrencySymbols.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Numerics.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Numerics.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Numerics.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Numerics.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Symbols.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Symbols.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Symbols.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-Symbols.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-TamilSymbol.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-TamilSymbol.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-TamilSymbol.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-TamilSymbol.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/gpos/IndicFontFeatureGPOS-BelowBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-tamil/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-tamil/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/misc/misc.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/misc/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/misc/misc.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/misc/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/LICENSE b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/LICENSE similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/LICENSE rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/LICENSE diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/README b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/README similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/README rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/README diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/SOURCES b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/SOURCES similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/SOURCES rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/SOURCES diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-AdditionalVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Consonants.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-DependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Digits.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-IndependentVowels.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-Reserved.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/codepoint/IndicFontFeatureCodepoint-VariousSigns.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/gpos/IndicFontFeatureGPOS-AboveBase.txt diff --git a/test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/gsub/IndicFontFeatureGSUB.txt b/test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/gsub/IndicFontFeatureGSUB.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/indic/script-telugu/utrrs/gsub/IndicFontFeatureGSUB.txt rename to test/shaping/texts/in-house/shaper-indic/script-telugu/utrrs/gsub/IndicFontFeatureGSUB.txt diff --git a/test/shaping/texts/in-house/shaper-indic/south-east-asian/script-khmer/misc/misc.txt b/test/shaping/texts/in-house/shaper-khmer/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/south-east-asian/script-khmer/misc/misc.txt rename to test/shaping/texts/in-house/shaper-khmer/misc.txt diff --git a/test/shaping/texts/in-house/shaper-indic/south-east-asian/script-khmer/misc/other-marks-invalid.txt b/test/shaping/texts/in-house/shaper-khmer/other-marks-invalid.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/south-east-asian/script-khmer/misc/other-marks-invalid.txt rename to test/shaping/texts/in-house/shaper-khmer/other-marks-invalid.txt diff --git a/test/shaping/texts/in-house/shaper-indic/south-east-asian/script-khmer/misc/other-marks.txt b/test/shaping/texts/in-house/shaper-khmer/other-marks.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/south-east-asian/script-khmer/misc/other-marks.txt rename to test/shaping/texts/in-house/shaper-khmer/other-marks.txt diff --git a/test/shaping/texts/in-house/shaper-indic/south-east-asian/script-javanese/misc.txt b/test/shaping/texts/in-house/shaper-use/script-javanese/misc.txt similarity index 100% rename from test/shaping/texts/in-house/shaper-indic/south-east-asian/script-javanese/misc.txt rename to test/shaping/texts/in-house/shaper-use/script-javanese/misc.txt From 2d6edc9008182c1446951f2c5c04df20094597f8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 13:56:55 -0700 Subject: [PATCH 11/50] [test] Add Khmer test texts from recent bugs --- .../texts/in-house/shaper-khmer/misc.txt | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/test/shaping/texts/in-house/shaper-khmer/misc.txt b/test/shaping/texts/in-house/shaper-khmer/misc.txt index 945dd1d56..3bbffe7ee 100644 --- a/test/shaping/texts/in-house/shaper-khmer/misc.txt +++ b/test/shaping/texts/in-house/shaper-khmer/misc.txt @@ -21,3 +21,69 @@ កោ្រ កៅ្រ ព៑ា +កន្ត្រាក់ +កន្រ្សិក់ +កន្រ្សីក់ +ក្សាន្ត +ក្សិន្ត +ក្សីន្ត +ក្សឹន្ត +ក្សឺន្ត +ក្សុន្ត +ក្សូន្ត +ក្សួន្ត +ក្សឿន្ត +ឃ្ល្សាំ +ឃ្ល្សិះ +ឃ្ល្សុំ +ឃ្ល្សុះ +ឃ្ល្សេះ +ឃ្ល្សោះ +ឃ្ល្សំ +ឃ្ល្សះ +ញូ +ញ្ញ +ញ្ញុ +ញ្ញូ +ញ្ញួ +ត្រ្សៀ +ត្រ្សេ +ត្រ្សែ +ត្រ្សៃ +ត្រ្សោ +ត្រ្សៅ +ធ្លុំក់ +ធ្លោក់ +ធ្លៅក់ +ធ្លំក់ +ម្ត្ល៉ា +ម្ត្ល៉ុ +ម្ត្ល៉ឿ +ម្ត្ល៉ៀ +យ្យើហ្វ្លៃ +រ្រ +សាស្ត្រឃ្ឈងា +សាស្ត្រឃ្ឈងិ +សាស្ត្រឃ្ឈងី +ស្ត្រីវ័ខ្ញ្សា +ស្រ្តា +ស្រ្តិ +ស្រ្តី +ស្រ្តឹ +ស្រ្តឺ +ស្រ្តុ +ស្រ្តូ +ស្រ្តួ +ស្រ្តើ +ស្រ្តឿ +ស្រ្ត៊ឿ +ស្រ្ត៊ៀ +ស្រ្ត៊េ +ស្រ្ត៊ែ +ស្រ្ត៊ៃ +ស្រ្ត៊ំ +ហ្គ្ស៊ើ +ហ្គ្ស៊ឿ +ហ្គ្ស៊ៀ +ហ្រ្វង្ក +ហ្រ្វាំង From 5772edc0ea8f697c6123e439c5d0c3e813ebeb45 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 14:10:31 -0700 Subject: [PATCH 12/50] [khmer] Typo --- src/hb-ot-shape-complex-khmer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index 582360397..264515e86 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -107,7 +107,7 @@ collect_features_khmer (hb_ot_shape_planner_t *plan) map->add_gsub_pause (setup_syllables); map->add_gsub_pause (reorder); - /* Testing suggests that Uniscribe does NOT before between basic + /* Testing suggests that Uniscribe does NOT pause between basic * features. Test with KhmerUI.ttf and the following three * sequences: * From fe099a844b9b8fe05dd4eb187b5ca3769441f012 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 14:20:31 -0700 Subject: [PATCH 13/50] [test] Add Khmer tests, with NotoSansKhmer-Regular.ttf Note that there's minor positioning differences, and ONE reordering difference between what we get for these and what Uniscribe gets. Probably same as what's described in commit message for 1a96cc825dc9c8e3b6eef1403fe0864a1cfc0245 --- ...98336402905b8be8301ef7f47cf7e050cbb1bd.ttf | Bin 0 -> 24392 bytes .../data/in-house/tests/khmer-misc.tests | 89 ++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 test/shaping/data/in-house/fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf create mode 100644 test/shaping/data/in-house/tests/khmer-misc.tests diff --git a/test/shaping/data/in-house/fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf b/test/shaping/data/in-house/fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf new file mode 100644 index 0000000000000000000000000000000000000000..3dd30ed69b129cdfc808e782474009f2e908d9e7 GIT binary patch literal 24392 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 literal 0 HcmV?d00001 diff --git a/test/shaping/data/in-house/tests/khmer-misc.tests b/test/shaping/data/in-house/tests/khmer-misc.tests new file mode 100644 index 000000000..a7a1c6dd8 --- /dev/null +++ b/test/shaping/data/in-house/tests/khmer-misc.tests @@ -0,0 +1,89 @@ +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1781,U+17D2,U+1798,U+17C2:[uni17C2=0+288|uni1781=0+635|uni17D21798=0@22,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1787,U+17B6:[uni178717B6=0+923] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1790,U+17D2,U+1784,U+17C3:[uni17C3=0+288|uni1790=0+635|uni17D21784=0@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+17B6:[uni179817B6=0+923] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+17D2,U+1796,U+17BB:[uni1798=0+635|uni17D21796=0@-1,-26+0|uni17BB=0@-22,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179A:[uni179A=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179A,U+17B8:[uni179A=0+288|uni17B8.r=0@76,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179A,U+17CD:[uni179A=0+288|uni17CD.r=0@18,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17C5:[uni17C1=0+288|uni179F17C5=0+1216] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179A,U+17D2,U+17A5:[uni179A=0+288|uni17D2=0+0|uni17A5=2+635] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1784,U+17B9,U+17D2,U+1788:[uni1784=0+635|uni17B9=0@-46,30+0|uni17D21788=0+234] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1784,U+17D2,U+1788,U+17B9:[uni1784=0+635|uni17D21788=0+234|uni17B9=0@8,30+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1784,U+17D2,U+1782,U+17D2,U+179A:[uni17D2179A.low=0+287|uni1784=0+635|uni17D21782=0@0,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1784,U+17D2,U+179A,U+17D2,U+1782:[uni17D2179A.low=0+287|uni1784=0+635|uni17D21782=0@0,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+17C9,U+17D2,U+179B,U+17C1,U+17C7:[uni17C1=0+288|uni1798=0+635|uni17C9=0@-46,-29+0|uni17D2179B=0@-1,-26+0|uni17C7=0+386] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+200C,U+17C9,U+17D2,U+179B,U+17C1,U+17C7:[uni17C1=0+288|uni1798=0+635|space=0+0|uni17C9=0@-46,-29+0|uni17D2179B=0@-1,-26+0|uni17C7=0+386] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1794,U+17CA,U+17D0:[uni1794=0+635|uni17CA=0@-46,-29+0|uni17D0=0@-46,113+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1793,U+17C2,U+17CE:[uni17C2=0+288|uni1793=0+635|uni17CE=0@-36,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17C1,U+17D2,U+179A:[uni17D2179A=0+287|uni17C1=0+288|uni1780=0+636] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17C0,U+17D2,U+179A:[uni17D2179A=0+287|uni17C1=0+288|uni1780=0+636|uni17C0.right1=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17C4,U+17D2,U+179A:[uni17D2179A=0+287|uni17C1=0+288|uni178017B6=0+924] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17C5,U+17D2,U+179A:[uni17D2179A=0+287|uni17C1=0+288|uni178017C5=0+924] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1796,U+17D1,U+17B6:[uni179617B6=0+923|uni17D1=0@-311,-19+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+1793,U+17D2,U+178F,U+17D2,U+179A,U+17B6,U+1780,U+17CB:[uni1780=0+636|uni17D2179A.low=1+287|uni179317B6=1+924|uni17D2178F=1@-290,-26+0|uni1780=7+636|uni17CB=7@-23,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+1793,U+17D2,U+179A,U+17D2,U+179F,U+17B7,U+1780,U+17CB:[uni1780=0+636|uni17D2179A=1+287|uni1793=1+635|uni17D2179F=1+302|uni17B7=1@-4,30+0|uni1780=7+636|uni17CB=7@-23,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+1793,U+17D2,U+179A,U+17D2,U+179F,U+17B8,U+1780,U+17CB:[uni1780=0+636|uni17D2179A=1+287|uni1793=1+635|uni17D2179F=1+302|uni17B8=1@-4,30+0|uni1780=7+636|uni17CB=7@-23,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17B6,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F17B6=0+584|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17B7,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F=0+302|uni17B7=0@-4,30+0|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17B8,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F=0+302|uni17B8=0@-4,30+0|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17B9,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F=0+302|uni17B9=0@-4,30+0|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17BA,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F=0+302|uni17BA=0@-4,30+0|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17BB,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F=0+302|uni17BB=0@1,-260+0|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17BC,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F=0+302|uni17BC=0@1,-260+0|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17BD,U+1793,U+17D2,U+178F:[uni1780=0+636|uni17D2179F=0+302|uni17BD=0@1,-260+0|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1780,U+17D2,U+179F,U+17BF,U+1793,U+17D2,U+178F:[uni17C1=0+288|uni1780=0+636|uni17D2179F=0+302|uni17BF.right2=0+288|uni1793=4+635|uni17D2178F=4@-1,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17B6,U+17C6:[uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F17B6.low=0+584|uni17C6=0@39,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17B7,U+17C7:[uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F.low=0+302|uni17B7=0@-4,30+0|uni17C7=0+386] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17BB,U+17C6:[uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F.low=0+302|uni17BB=0+0|uni17C6=0@-4,30+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17BB,U+17C7:[uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F.low=0+302|uni17BB=0+0|uni17C7=0+386] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17C1,U+17C7:[uni17C1=0+288|uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F.low=0+302|uni17C7=0+386] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17C4,U+17C7:[uni17C1=0+288|uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F17B6.low=0+584|uni17C7=0+386] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17C6:[uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F.low=0+302|uni17C6=0@-4,30+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1783,U+17D2,U+179B,U+17D2,U+179F,U+17C7:[uni1783=0+928|uni17D2179B=0@15,-26+0|uni17D2179F.low=0+302|uni17C7=0+386] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1789,U+17BC:[uni1789=0+952|uni17BC=0@-173,-260+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1789,U+17D2,U+1789:[uni1789.a=0+952|uni17D21789.a=0@19,-22+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1789,U+17D2,U+1789,U+17BB:[uni1789.a=0+952|uni17D21789.a=0@19,-22+0|uni17BB=0@-160,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1789,U+17D2,U+1789,U+17BC:[uni1789.a=0+952|uni17D21789.a=0@19,-22+0|uni17BC=0@-160,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1789,U+17D2,U+1789,U+17BD:[uni1789.a=0+952|uni17D21789.a=0@19,-22+0|uni17BD=0@-160,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+178F,U+17D2,U+179A,U+17D2,U+179F,U+17C0:[uni17C1=0+288|uni17D2179A=0+287|uni178F=0+635|uni17D2179F=0+302|uni17C0.right2=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+178F,U+17D2,U+179A,U+17D2,U+179F,U+17C1:[uni17C1=0+288|uni17D2179A=0+287|uni178F=0+635|uni17D2179F=0+302] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+178F,U+17D2,U+179A,U+17D2,U+179F,U+17C2:[uni17C2=0+288|uni17D2179A=0+287|uni178F=0+635|uni17D2179F=0+302] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+178F,U+17D2,U+179A,U+17D2,U+179F,U+17C3:[uni17C3=0+288|uni17D2179A=0+287|uni178F=0+635|uni17D2179F=0+302] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+178F,U+17D2,U+179A,U+17D2,U+179F,U+17C4:[uni17C1=0+288|uni17D2179A=0+287|uni178F=0+635|uni17D2179F17B6=0+584] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+178F,U+17D2,U+179A,U+17D2,U+179F,U+17C5:[uni17C1=0+288|uni17D2179A=0+287|uni178F=0+635|uni17D2179F17C5=0+584] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1792,U+17D2,U+179B,U+17BB,U+17C6,U+1780,U+17CB:[uni1792=0+635|uni17D2179B=0@-2,-26+0|uni17BB=0@-19,-296+0|uni17C6=0@-46,-29+0|uni1780=5+636|uni17CB=5@-23,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1792,U+17D2,U+179B,U+17C4,U+1780,U+17CB:[uni17C1=0+288|uni179217B6=0+923|uni17D2179B=0@-290,-26+0|uni1780=4+636|uni17CB=4@-23,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1792,U+17D2,U+179B,U+17C5,U+1780,U+17CB:[uni17C1=0+288|uni179217C5=0+923|uni17D2179B=0@-290,-26+0|uni1780=4+636|uni17CB=4@-23,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1792,U+17D2,U+179B,U+17C6,U+1780,U+17CB:[uni1792=0+635|uni17D2179B=0@-2,-26+0|uni17C6=0@-46,-29+0|uni1780=4+636|uni17CB=4@-23,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+17D2,U+178F,U+17D2,U+179B,U+17C9,U+17B6:[uni179817B6=0+923|uni17D2178F=0@-289,-26+0|uni17D2179B=0@-289,-296+0|uni17C9=0@-334,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+17D2,U+178F,U+17D2,U+179B,U+17C9,U+17BB:[uni1798=0+635|uni17D2178F=0@-1,-26+0|uni17D2179B=0@-1,-296+0|uni17C9=0@-46,-29+0|uni17BB=0@-18,-566+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+17D2,U+178F,U+17D2,U+179B,U+17C9,U+17BF:[uni17C1=0+288|uni1798=0+635|uni17D2178F=0@-1,-26+0|uni17D2179B=0@-1,-296+0|uni17C9=0@-46,-29+0|uni17BF.right1=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1798,U+17D2,U+178F,U+17D2,U+179B,U+17C9,U+17C0:[uni17C1=0+288|uni1798=0+635|uni17D2178F=0@-1,-26+0|uni17D2179B=0@-1,-296+0|uni17C9=0@-46,-29+0|uni17C0.right1=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+1799,U+17D2,U+1799,U+17BE,U+17A0,U+17D2,U+179C,U+17D2,U+179B,U+17C3:[uni17C1=0+288|uni1799=0+953|uni17D21799=0+298|uni17B8=0@1,30+0|uni17C3=4+288|uni17A0=4+928|uni17D2179C=4@20,-26+0|uni17D2179B=4@19,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179A,U+17D2,U+179A:[uni17D2179A=0+287|uni179A=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17B6,U+179F,U+17D2,U+178F,U+17D2,U+179A,U+1783,U+17D2,U+1788,U+1784,U+17B6:[uni179F17B6=0+1216|uni17D2179A=2+287|uni179F=2+928|uni17D2178F=2@14,-26+0|uni1783=7+928|uni17D21788=7+234|uni178417B6=10+923] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17B6,U+179F,U+17D2,U+178F,U+17D2,U+179A,U+1783,U+17D2,U+1788,U+1784,U+17B7:[uni179F17B6=0+1216|uni17D2179A=2+287|uni179F=2+928|uni17D2178F=2@14,-26+0|uni1783=7+928|uni17D21788=7+234|uni1784=10+635|uni17B7=10@-46,30+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17B6,U+179F,U+17D2,U+178F,U+17D2,U+179A,U+1783,U+17D2,U+1788,U+1784,U+17B8:[uni179F17B6=0+1216|uni17D2179A=2+287|uni179F=2+928|uni17D2178F=2@14,-26+0|uni1783=7+928|uni17D21788=7+234|uni1784=10+635|uni17B8=10@-46,30+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+178F,U+17D2,U+179A,U+17B8,U+179C,U+17D0,U+1781,U+17D2,U+1789,U+17D2,U+179F,U+17B6:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17B8=0@-32,-29+0|uni179C=6+326|uni17D0=6@139,40+0|uni1781=8+635|uni17D21789=8@-4,-26+0|uni17D2179F17B6.low=8+584] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17B6:[uni17D2179A=0+287|uni179F17B6=0+1216|uni17D2178F=0@-274,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17B7:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17B7=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17B8:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17B8=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17B9:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17B9=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17BA:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17BA=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17BB:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17BB=0@-6,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17BC:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17BC=0@-6,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17BD:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17BD=0@-6,-296+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17BE:[uni17C1=0+288|uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17B8=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17BF:[uni17C1=0+288|uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17BF.right2=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17CA,U+17BF:[uni17C1=0+288|uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17CA=0@-32,-29+0|uni17BF.right1=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17CA,U+17C0:[uni17C1=0+288|uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17CA=0@-32,-29+0|uni17C0.right1.high=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17CA,U+17C1:[uni17C1=0+288|uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17CA=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17CA,U+17C2:[uni17C2=0+288|uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17CA=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17CA,U+17C3:[uni17C3=0+288|uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17CA=0@-32,-29+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+179F,U+17D2,U+179A,U+17D2,U+178F,U+17CA,U+17C6:[uni17D2179A=0+287|uni179F=0+928|uni17D2178F=0@14,-26+0|uni17CA=0@-32,-29+0|uni17C6=0@-32,113+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+17A0,U+17D2,U+1782,U+17D2,U+179F,U+17CA,U+17BE:[uni17C1=0+288|uni17A0=0+928|uni17D21782=0@20,-26+0|uni17D2179F.low=0+302|uni17BB=0+0|uni17B8=0@-4,30+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+17A0,U+17D2,U+1782,U+17D2,U+179F,U+17CA,U+17BF:[uni17C1=0+288|uni17A0=0+928|uni17D21782=0@20,-26+0|uni17D2179F.low=0+302|uni17CA=0@-4,30+0|uni17BF.right1=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+17A0,U+17D2,U+1782,U+17D2,U+179F,U+17CA,U+17C0:[uni17C1=0+288|uni17A0=0+928|uni17D21782=0@20,-26+0|uni17D2179F.low=0+302|uni17CA=0@-4,30+0|uni17C0.right1.high=0+288] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+17A0,U+17D2,U+179A,U+17D2,U+179C,U+1784,U+17D2,U+1780:[uni17D2179A=0+287|uni17A0=0+928|uni17D2179C=0@20,-26+0|uni1784=5+635|uni17D21780=5@0,-26+0] +../fonts/3998336402905b8be8301ef7f47cf7e050cbb1bd.ttf::U+17A0,U+17D2,U+179A,U+17D2,U+179C,U+17B6,U+17C6,U+1784:[uni17D2179A=0+287|uni17A017B6=0+1216|uni17D2179C=0@-268,-26+0|uni17C6=0@47,-29+0|uni1784=7+635] From 92ba9905caa060466230f63b428ccee767696464 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 15:19:32 -0700 Subject: [PATCH 14/50] [indic] Allow double-halant in old-spec Devanagari Fixes https://github.com/harfbuzz/harfbuzz/issues/1071 --- src/hb-ot-shape-complex-indic.cc | 18 ++++++++++++------ ...22a7d09e60421f3efbc706ad348ab47b88567b.ttf | Bin 0 -> 4672 bytes .../data/in-house/tests/indic-old-spec.tests | 2 ++ 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 test/shaping/data/in-house/fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index b8d9a3acf..4cb69fc71 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -667,10 +667,10 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, * last consonant. * * Reports suggest that in some scripts Uniscribe does this only if there - * is *not* a Halant after last consonant already (eg. Kannada), while it - * does it unconditionally in other scripts (eg. Malayalam, Bengali). We - * don't currently know about other scripts, so we whitelist Malayalam and - * Bengali for now. + * is *not* a Halant after last consonant already. We know that is the + * case for Kannada, while it reorders unconditionally in other scripts, + * eg. Malayalam, Bengali, and Devanagari. We don't currently know about + * other scripts, so we whitelist Malayalam, Bengali, and Devanagari. * * Kannada test case: * U+0C9A,U+0CCD,U+0C9A,U+0CCD @@ -681,15 +681,21 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, * U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D * With lohit-ttf-20121122/Lohit-Malayalam.ttf * - * Bengali test case + * Bengali test case: * U+0998,U+09CD,U+09AF,U+09CD * With Windows XP vrinda.ttf * https://github.com/harfbuzz/harfbuzz/issues/1073 + * + * Devanagari test case: + * U+091F,U+094D,U+0930,U+094D + * With chandas.ttf + * https://github.com/harfbuzz/harfbuzz/issues/1071 */ if (indic_plan->is_old_spec) { bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM && - buffer->props.script != HB_SCRIPT_BENGALI; + buffer->props.script != HB_SCRIPT_BENGALI && + buffer->props.script != HB_SCRIPT_DEVANAGARI; for (unsigned int i = base + 1; i < end; i++) if (info[i].indic_category() == OT_H) { diff --git a/test/shaping/data/in-house/fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf b/test/shaping/data/in-house/fonts/b722a7d09e60421f3efbc706ad348ab47b88567b.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ca23ef83db38025412dc80e8ecbcdc415e97fb87 GIT binary patch literal 4672 zcmb7HYit}>6+U-ncgO3;zUmlIW5;pQyqq+ImUI%^v0LwE zwRT=VP*afl1BI%MgQyTlB#}@N|3I{~Y6Vp#ictCkeiW)Cw3UEHf*(LhDu}bockZn1 zwQ-_kMl<)EbI(1G@7{av3<)A~(Rotonc>v-A&O86f?JTTAKts?z}EJCw~5@fL}G0C zz`?Em+VqJ+t*T(9Hod+-mQUL}!t z6`m{{M!pUrtxap&ECTOj<_&%R%8xS{L(g16TKUWQPw6Y9QxrPUxYB0~D!s|D(jc_9 zxY`ueYy7=Q40MSP0!C-h7jF0a8WY2hP5F)f9X*YnRLB+f>qc$o-|9PzdVhP^=Zc|M zH~NQTo>XPHy<=XAc2(&?(-~{dKL$(Lvn^L?cZBeL#12?H=?S z{-(Mrj_9bUufbSdYwL@vRYO9UgZ*Ox58DEx5lM(ihw5KqR-gS zoAd|5LiaYc^*08D5my)tareVYZ%vu)*LwbUwa!pw&ALio=!T(-1tWjeu4ziSGMfJ+ z9C0h}>mm_s_V{#frMFEJ!qAQU&+0-h)l&^L*z*y1Zezc?Ces4Yg9<|p*sY29lIUw> z@5=UX>qifK?TJ({*;cRWhBMr~Io5Mzs3S74uV-ie6+>6H8_MVv|Iz*1$Eti@n{HG_ z!Zn@4PbYi!4MZ^42C0Q>g|8R0ZKm$~beGtoKtpeJzxS4+B zZEgxztga*0hEf&`Js)%T1g$EIIy$mkWdmLL&*e6|;i_%$m8~u_#f_$44g}rpI~I%Z zwwi!PM-lEXZab^)sb197!(?L4i&fPhXbe0cdag-pC*Fq&*;`VKmx{(tS(V${#2+4* z)4H|c2r8&AcT21JPh{>^P47sx8}~_cO>COW3M=dXy{n6Opc)t4vNCQ58YMMngFN@N zyC|$_3+DFSltBrQ8JF9cepIMh^u6g8Cs)BW11qM)=_gA*|Yz(cD6B5A}jF0|8eL*`Hbg0>^Bx_snI_8#lphR?N7JxJfniUq}}< z(Vk~qmagOGb2)mPBF^1KA2-xn5fb0s0}Vw}K0*_b$^zfJJhGB((C4-cW^EYR;9T$A z>fBu@Kw82TKD~46&WCs2z4L|~ht8!-qa$q1hVNWu3{s00AU%!uxYXPxZDzok=!?)KBFIR;(~{3Ya|RFh@|XynLjO4E z9Oz+sf)2`d0#cTl((hhq9RoFu*dw${wyeQ6IKCnDTM=41i+vGzo}jZO{!PSc{Tv-AM!(EYW1NYTnn$dh;r;M+LZZ)W zXJuc6R`wo}8O|a;UK0`OfxRSFdvP-^H1L1S8kY|;RVYFgHenYI)TJ`v6y>5qREjF$ z5^muUUi)ctZtj$FaLjRfI=3Zl+H(`xDO1Ur%9yFwqN{-!iY`&*pWq;aRDx zNZn?s%l@E?KTs8qjazVOaA|OOq-`te8jK5~s<00gJ=|)=lc5|Oo&y zwL-M874c5tS&qGM5xR`2K`)UaF?G$Da~b?;E+VT*uUv;!;Ddj3TpDnmq%OQ?DLG}% zOwz_|Zeo@Ov$J!vG?dFuP0}tbpHo<`jEBSv@mbh#RF);ijAeXTc{qV_9Qz_e->2Ww zpRqohWh4?^!7G6Cw_!X-w2a8Dr5;AKv?m3=99DT$x$I-AVwG07M2k-y_GFWIGR5<# zf#+D+f2nrml6F;*Vt*AS+B{2E)E;P*+Tpcl_27JkH%6*- Date: Tue, 31 Jul 2018 15:27:29 -0700 Subject: [PATCH 15/50] [indic] Flip default logic for double-halants in old-school Oriya went down from 9 to 2. BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%) DEVANAGARI: 707311 out of 707394 tests passed. 83 failed (0.0117332%) GUJARATI: 366355 out of 366457 tests passed. 102 failed (0.0278341%) GURMUKHI: 60729 out of 60747 tests passed. 18 failed (0.0296311%) KANNADA: 951300 out of 951913 tests passed. 613 failed (0.0643966%) MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%) MYANMAR: 1115830 out of 1123883 tests passed. 8053 failed (0.716534%) ORIYA: 42327 out of 42329 tests passed. 2 failed (0.00472489%) SINHALA: 271596 out of 271847 tests passed. 251 failed (0.0923313%) TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%) TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%) --- src/hb-ot-shape-complex-indic.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 4cb69fc71..25cb05c18 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -670,7 +670,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, * is *not* a Halant after last consonant already. We know that is the * case for Kannada, while it reorders unconditionally in other scripts, * eg. Malayalam, Bengali, and Devanagari. We don't currently know about - * other scripts, so we whitelist Malayalam, Bengali, and Devanagari. + * other scripts, so we blacklist Kannada. * * Kannada test case: * U+0C9A,U+0CCD,U+0C9A,U+0CCD @@ -693,9 +693,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, */ if (indic_plan->is_old_spec) { - bool disallow_double_halants = buffer->props.script != HB_SCRIPT_MALAYALAM && - buffer->props.script != HB_SCRIPT_BENGALI && - buffer->props.script != HB_SCRIPT_DEVANAGARI; + bool disallow_double_halants = buffer->props.script == HB_SCRIPT_KANNADA; for (unsigned int i = base + 1; i < end; i++) if (info[i].indic_category() == OT_H) { From 7d92bef9c5afb319d125f60b0fce4763afeaa686 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 30 Jul 2018 17:17:43 -0700 Subject: [PATCH 16/50] [subset] collect features first, then use those to collect lookups. --- src/hb-ot-layout.cc | 174 +++++++++++++++++++++----------------------- src/hb-ot-layout.h | 7 ++ 2 files changed, 91 insertions(+), 90 deletions(-) diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index b38dbc384..7b30fc7b3 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -658,13 +658,12 @@ _hb_ot_layout_collect_lookups_lookups (hb_face_t *face, } static void -_hb_ot_layout_collect_lookups_features (hb_face_t *face, - hb_tag_t table_tag, - unsigned int script_index, - unsigned int language_index, - const hb_tag_t *features, - hb_set_t *visited_features, - hb_set_t *lookup_indexes /* OUT */) +_hb_ot_layout_collect_features_features (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + const hb_tag_t *features, + hb_set_t *feature_indexes /* OUT */) { if (!features) { @@ -674,15 +673,8 @@ _hb_ot_layout_collect_lookups_features (hb_face_t *face, script_index, language_index, &required_feature_index, - nullptr) - && !visited_features->has (required_feature_index)) - { - _hb_ot_layout_collect_lookups_lookups (face, - table_tag, - required_feature_index, - lookup_indexes); - visited_features->add (required_feature_index); - } + nullptr)) + feature_indexes->add (required_feature_index); /* All features */ unsigned int feature_indices[32]; @@ -699,14 +691,7 @@ _hb_ot_layout_collect_lookups_features (hb_face_t *face, feature_indices); for (unsigned int i = 0; i < len; i++) - { - if (visited_features->has (feature_indices[i])) continue; - _hb_ot_layout_collect_lookups_lookups (face, - table_tag, - feature_indices[i], - lookup_indexes); - visited_features->add (feature_indices[i]); - } + feature_indexes->add (feature_indices[i]); offset += len; } while (len == ARRAY_LENGTH (feature_indices)); @@ -722,30 +707,25 @@ _hb_ot_layout_collect_lookups_features (hb_face_t *face, language_index, *features, &feature_index)) - _hb_ot_layout_collect_lookups_lookups (face, - table_tag, - feature_index, - lookup_indexes); + feature_indexes->add (feature_index); } } } static void -_hb_ot_layout_collect_lookups_languages (hb_face_t *face, - hb_tag_t table_tag, - unsigned int script_index, - const hb_tag_t *languages, - const hb_tag_t *features, - hb_set_t *visited_features, - hb_set_t *lookup_indexes /* OUT */) +_hb_ot_layout_collect_features_languages (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + const hb_tag_t *languages, + const hb_tag_t *features, + hb_set_t *feature_indexes /* OUT */) { - _hb_ot_layout_collect_lookups_features (face, - table_tag, - script_index, - HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX, - features, - visited_features, - lookup_indexes); + _hb_ot_layout_collect_features_features (face, + table_tag, + script_index, + HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX, + features, + feature_indexes); if (!languages) { @@ -755,13 +735,12 @@ _hb_ot_layout_collect_lookups_languages (hb_face_t *face, script_index, 0, nullptr, nullptr); for (unsigned int language_index = 0; language_index < count; language_index++) - _hb_ot_layout_collect_lookups_features (face, - table_tag, - script_index, - language_index, - features, - visited_features, - lookup_indexes); + _hb_ot_layout_collect_features_features (face, + table_tag, + script_index, + language_index, + features, + feature_indexes); } else { @@ -773,13 +752,58 @@ _hb_ot_layout_collect_lookups_languages (hb_face_t *face, script_index, *languages, &language_index)) - _hb_ot_layout_collect_lookups_features (face, - table_tag, - script_index, - language_index, - features, - visited_features, - lookup_indexes); + _hb_ot_layout_collect_features_features (face, + table_tag, + script_index, + language_index, + features, + feature_indexes); + } + } +} + +/** + * hb_ot_layout_collect_lookups: + * + * Since: 0.9.8 + **/ +void +hb_ot_layout_collect_features (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *scripts, + const hb_tag_t *languages, + const hb_tag_t *features, + hb_set_t *feature_indexes /* OUT */) +{ + if (!scripts) + { + /* All scripts */ + unsigned int count = hb_ot_layout_table_get_script_tags (face, + table_tag, + 0, nullptr, nullptr); + for (unsigned int script_index = 0; script_index < count; script_index++) + _hb_ot_layout_collect_features_languages (face, + table_tag, + script_index, + languages, + features, + feature_indexes); + } + else + { + for (; *scripts; scripts++) + { + unsigned int script_index; + if (hb_ot_layout_table_find_script (face, + table_tag, + *scripts, + &script_index)) + _hb_ot_layout_collect_features_languages (face, + table_tag, + script_index, + languages, + features, + feature_indexes); } } } @@ -797,40 +821,10 @@ hb_ot_layout_collect_lookups (hb_face_t *face, const hb_tag_t *features, hb_set_t *lookup_indexes /* OUT */) { - hb_auto_t visited_features; - if (!scripts) - { - /* All scripts */ - unsigned int count = hb_ot_layout_table_get_script_tags (face, - table_tag, - 0, nullptr, nullptr); - for (unsigned int script_index = 0; script_index < count; script_index++) - _hb_ot_layout_collect_lookups_languages (face, - table_tag, - script_index, - languages, - features, - &visited_features, - lookup_indexes); - } - else - { - for (; *scripts; scripts++) - { - unsigned int script_index; - if (hb_ot_layout_table_find_script (face, - table_tag, - *scripts, - &script_index)) - _hb_ot_layout_collect_lookups_languages (face, - table_tag, - script_index, - languages, - features, - &visited_features, - lookup_indexes); - } - } + hb_auto_t feature_indexes; + hb_ot_layout_collect_features (face, table_tag, scripts, languages, features, &feature_indexes); + for (hb_codepoint_t feature_index = HB_SET_VALUE_INVALID; hb_set_next (&feature_indexes, &feature_index);) + _hb_ot_layout_collect_lookups_lookups (face, table_tag, feature_index, lookup_indexes); } /** diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h index f8597673f..f81b9dd41 100644 --- a/src/hb-ot-layout.h +++ b/src/hb-ot-layout.h @@ -194,6 +194,13 @@ HB_EXTERN unsigned int hb_ot_layout_table_get_lookup_count (hb_face_t *face, hb_tag_t table_tag); +HB_EXTERN void +hb_ot_layout_collect_features (hb_face_t *face, + hb_tag_t table_tag, + const hb_tag_t *scripts, + const hb_tag_t *languages, + const hb_tag_t *features, + hb_set_t *feature_indexes /* OUT */); HB_EXTERN void hb_ot_layout_collect_lookups (hb_face_t *face, From 89733755a48feef0a663e1ea7b8294949581ce7e Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 30 Jul 2018 18:10:43 -0700 Subject: [PATCH 17/50] [subset] use add_array to populate feature_indexes. This is much faster then calling a bunch of individual add()'s. --- src/hb-ot-layout-common-private.hh | 7 ++++++ src/hb-ot-layout.cc | 40 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 1cf530ead..76ad30cf1 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -190,6 +190,11 @@ struct IndexArray : ArrayOf } return this->len; } + + inline void add_indexes_to (hb_set_t* output /* OUT */) const + { + output->add_array (arrayZ, len); + } }; @@ -208,6 +213,8 @@ struct LangSys unsigned int *feature_count /* IN/OUT */, unsigned int *feature_indexes /* OUT */) const { return featureIndex.get_indexes (start_offset, feature_count, feature_indexes); } + inline void add_feature_indexes_to (hb_set_t *feature_indexes) const + { featureIndex.add_indexes_to (feature_indexes); } inline bool has_required_feature (void) const { return reqFeatureIndex != 0xFFFFu; } inline unsigned int get_required_feature_index (void) const diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 7b30fc7b3..db7823480 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -520,6 +520,19 @@ hb_ot_layout_language_get_required_feature (hb_face_t *face, return l.has_required_feature (); } +static void +_hb_ot_layout_language_add_feature_indexes_to (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_index, + hb_set_t *feature_indexes /* OUT */) +{ + const OT::GSUBGPOS &g = get_gsubgpos_table (face, table_tag); + const OT::LangSys &l = g.get_script (script_index).get_lang_sys (language_index); + l.add_feature_indexes_to (feature_indexes); +} + + unsigned int hb_ot_layout_language_get_feature_indexes (hb_face_t *face, hb_tag_t table_tag, @@ -677,24 +690,11 @@ _hb_ot_layout_collect_features_features (hb_face_t *face, feature_indexes->add (required_feature_index); /* All features */ - unsigned int feature_indices[32]; - unsigned int offset, len; - - offset = 0; - do { - len = ARRAY_LENGTH (feature_indices); - hb_ot_layout_language_get_feature_indexes (face, - table_tag, - script_index, - language_index, - offset, &len, - feature_indices); - - for (unsigned int i = 0; i < len; i++) - feature_indexes->add (feature_indices[i]); - - offset += len; - } while (len == ARRAY_LENGTH (feature_indices)); + _hb_ot_layout_language_add_feature_indexes_to (face, + table_tag, + script_index, + language_index, + feature_indexes); } else { @@ -763,9 +763,9 @@ _hb_ot_layout_collect_features_languages (hb_face_t *face, } /** - * hb_ot_layout_collect_lookups: + * hb_ot_layout_collect_features: * - * Since: 0.9.8 + * Since: REPLACEME **/ void hb_ot_layout_collect_features (hb_face_t *face, From 7278d9df3093a87f99cec9b4cea38bd688c5d020 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Tue, 31 Jul 2018 17:59:19 -0700 Subject: [PATCH 18/50] [subset] Add hb_ot_layout_collect_features to harfbuzz-sections.txt. Add the fuzzer test case for feature collection timeout. --- docs/harfbuzz-sections.txt | 1 + ...minimized-hb-subset-fuzzer-5542653037903872 | Bin 0 -> 160249 bytes 2 files changed, 1 insertion(+) create mode 100644 test/api/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5542653037903872 diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index b93cd1d60..5cf5a884e 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -447,6 +447,7 @@ HB_OT_TAG_GPOS HB_OT_TAG_GSUB HB_OT_TAG_JSTF hb_ot_layout_collect_lookups +hb_ot_layout_collect_features hb_ot_layout_feature_get_lookups hb_ot_layout_feature_with_variations_get_lookups hb_ot_layout_get_attach_points diff --git a/test/api/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5542653037903872 b/test/api/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5542653037903872 new file mode 100644 index 0000000000000000000000000000000000000000..6307ddd4bdde5d804a17b92face6673efd4bced7 GIT binary patch literal 160249 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 Date: Tue, 31 Jul 2018 17:44:02 -0700 Subject: [PATCH 19/50] [subset] limit the max codepoint value to the unicode limit. When collecting all codepoints in the cmap avoid using large amount of memory for fonts that declare coverage over all 32 bit integers. --- src/hb-ot-cmap-table.hh | 9 +++++++-- ...-subset-get-codepoints-fuzzer-5973295416475648 | Bin 0 -> 109 bytes 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 test/api/fonts/clusterfuzz-testcase-minimized-hb-subset-get-codepoints-fuzzer-5973295416475648 diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 00f835285..67a9c7dd9 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -37,6 +37,9 @@ */ #define HB_OT_TAG_cmap HB_TAG('c','m','a','p') +#ifndef HB_MAX_UNICODE_CODEPOINT_VALUE +#define HB_MAX_UNICODE_CODEPOINT_VALUE 0x10FFFF +#endif namespace OT { @@ -437,8 +440,10 @@ struct CmapSubtableLongSegmented { for (unsigned int i = 0; i < this->groups.len; i++) { hb_set_add_range (out, - this->groups[i].startCharCode, - this->groups[i].endCharCode); + MIN ((unsigned int) this->groups[i].startCharCode, + (unsigned int) HB_MAX_UNICODE_CODEPOINT_VALUE), + MIN ((unsigned int) this->groups[i].endCharCode, + (unsigned int) HB_MAX_UNICODE_CODEPOINT_VALUE)); } } diff --git a/test/api/fonts/clusterfuzz-testcase-minimized-hb-subset-get-codepoints-fuzzer-5973295416475648 b/test/api/fonts/clusterfuzz-testcase-minimized-hb-subset-get-codepoints-fuzzer-5973295416475648 new file mode 100644 index 0000000000000000000000000000000000000000..b506d2a5ab0e6ed72082ae9e5b4c9c24bb6dda7a GIT binary patch literal 109 zcmZQzWME)mRe*s13JO332g$jK1q=*pKq@r<0SRUX9v%<}23X!P{8s~V*o7DvK;o|K f5E(88{-3Y@AGtk!k`O~hDuVzcTSh8SW&r~Lqn8rN literal 0 HcmV?d00001 From 06b91d935da1a40ef9de6697717eb0af1015989e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 19:29:49 -0700 Subject: [PATCH 20/50] Revert "[atomic] Make pointer get op relaxed instead of acquire" This reverts commit b1e5650c67266dc158f22355fed206cd1c413f70. After lots of head-scratching and finally finding the only truly readable source to be the good old: https://www.kernel.org/doc/Documentation/memory-barriers.txt I've convinced myself that we need consume memory-ordering on get(). The location of memory-barrier in a load should be after, not before the load. That needs fixing. I'll do that separately. --- src/hb-atomic-private.hh | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index c860582dd..02cf6f388 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -40,19 +40,20 @@ /* We need external help for these */ #if defined(hb_atomic_int_impl_add) \ + && defined(hb_atomic_ptr_impl_get) \ && defined(hb_atomic_ptr_impl_cmpexch) /* Defined externally, i.e. in config.h; must have typedef'ed hb_atomic_int_impl_t as well. */ -#elif !defined(HB_NO_MT) && defined(__ATOMIC_RELAXED) +#elif !defined(HB_NO_MT) && defined(__ATOMIC_ACQUIRE) /* C++11-style GCC primitives. */ typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) __atomic_fetch_add (&(AI), (V), __ATOMIC_ACQ_REL) -#define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_RELAXED) +#define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_ACQUIRE) static inline bool _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) { @@ -70,7 +71,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (reinterpret_cast *> (&AI)->fetch_add ((V), std::memory_order_acq_rel)) -#define hb_atomic_ptr_impl_get(P) (reinterpret_cast *> (P)->load (std::memory_order_relaxed)) +#define hb_atomic_ptr_impl_get(P) (reinterpret_cast *> (P)->load (std::memory_order_acquire)) static inline bool _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) { @@ -84,9 +85,22 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #include +/* MinGW has a convoluted history of supporting MemoryBarrier + * properly. As such, define a function to wrap the whole + * thing. */ +static inline void _HBMemoryBarrier (void) { +#if !defined(MemoryBarrier) + long dummy = 0; + InterlockedExchange (&dummy, 1); +#else + MemoryBarrier (); +#endif +} + typedef LONG hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd (&(AI), (V)) +#define hb_atomic_ptr_impl_get(P) (_HBMemoryBarrier (), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O)) @@ -95,6 +109,7 @@ typedef LONG hb_atomic_int_impl_t; typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add (&(AI), (V)) +#define hb_atomic_ptr_impl_get(P) (void *) (__sync_synchronize (), *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) @@ -104,9 +119,10 @@ typedef int hb_atomic_int_impl_t; #include typedef unsigned int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) (({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) +#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) -#define hb_atomic_ptr_impl_cmpexch(P,O,N) (({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) +#define hb_atomic_ptr_impl_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) #elif !defined(HB_NO_MT) && defined(__APPLE__) @@ -122,6 +138,7 @@ typedef unsigned int hb_atomic_int_impl_t; typedef int32_t hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), &(AI)) - (V)) +#define hb_atomic_ptr_impl_get(P) (OSMemoryBarrier (), (void *) *(P)) #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) #define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) #else @@ -154,6 +171,7 @@ static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add (&(AI), (V)) +#define hb_atomic_ptr_impl_get(P) (__sync(), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) #elif !defined(HB_NO_MT) @@ -163,6 +181,7 @@ typedef int hb_atomic_int_impl_t; typedef volatile int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) +#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false) @@ -171,16 +190,13 @@ typedef volatile int hb_atomic_int_impl_t; typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) +#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false) #endif -#ifndef hb_atomic_ptr_impl_get -#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) -#endif - #ifndef HB_ATOMIC_INT_INIT #define HB_ATOMIC_INT_INIT(V) {V} #endif From 3dd1b88765f6ce91bd0558a16cdd8cf0c1e15d1b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 19:33:37 -0700 Subject: [PATCH 21/50] [atomic] Use CONSUME, not ACQUIRE, memory-order for get() Although, all implementations just elevate that to ACQUIRE. But requirement for us is just CONSUME. --- src/hb-atomic-private.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 02cf6f388..e6a3a9a9b 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -46,14 +46,14 @@ /* Defined externally, i.e. in config.h; must have typedef'ed hb_atomic_int_impl_t as well. */ -#elif !defined(HB_NO_MT) && defined(__ATOMIC_ACQUIRE) +#elif !defined(HB_NO_MT) && defined(__ATOMIC_CONSUME) /* C++11-style GCC primitives. */ typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) __atomic_fetch_add (&(AI), (V), __ATOMIC_ACQ_REL) -#define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_ACQUIRE) +#define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_CONSUME) static inline bool _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) { @@ -71,7 +71,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (reinterpret_cast *> (&AI)->fetch_add ((V), std::memory_order_acq_rel)) -#define hb_atomic_ptr_impl_get(P) (reinterpret_cast *> (P)->load (std::memory_order_acquire)) +#define hb_atomic_ptr_impl_get(P) (reinterpret_cast *> (P)->load (std::memory_order_consume)) static inline bool _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) { From 4bc16aca4760ac9ffd8c63bbaea24fc7d234f715 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 21:05:51 -0700 Subject: [PATCH 22/50] [atomic] Add get_relaxed / set_relaxed To help TSan and be more "correct". --- src/hb-atomic-private.hh | 37 ++++++++++++++++++---------- src/hb-common.cc | 4 +-- src/hb-debug.hh | 42 ++++++++++++++++++++++++++++++++ src/hb-object-private.hh | 12 ++++----- src/hb-ot-shape-complex-indic.cc | 22 +++++++++-------- src/hb-private.hh | 28 --------------------- 6 files changed, 86 insertions(+), 59 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index e6a3a9a9b..bad409bb6 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -51,7 +51,9 @@ /* C++11-style GCC primitives. */ typedef int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) __atomic_fetch_add (&(AI), (V), __ATOMIC_ACQ_REL) +#define hb_atomic_int_impl_add(AI, V) __atomic_fetch_add ((AI), (V), __ATOMIC_ACQ_REL) +#define hb_atomic_int_impl_set_relaxed(AI, V) __atomic_store_n ((AI), (V), __ATOMIC_RELAXED) +#define hb_atomic_int_impl_get_relaxed(AI) __atomic_load_n ((AI), __ATOMIC_RELAXED) #define hb_atomic_ptr_impl_get(P) __atomic_load_n ((P), __ATOMIC_CONSUME) static inline bool @@ -69,7 +71,9 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #include typedef int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) (reinterpret_cast *> (&AI)->fetch_add ((V), std::memory_order_acq_rel)) +#define hb_atomic_int_impl_add(AI, V) (reinterpret_cast *> (AI)->fetch_add ((V), std::memory_order_acq_rel)) +#define hb_atomic_int_impl_set_relaxed(AI, V) (reinterpret_cast *> (AI)->store ((V), std::memory_order_relaxed)) +#define hb_atomic_int_impl_get_relaxed(AI) (reinterpret_cast *> (AI)->load (std::memory_order_relaxed)) #define hb_atomic_ptr_impl_get(P) (reinterpret_cast *> (P)->load (std::memory_order_consume)) static inline bool @@ -98,7 +102,7 @@ static inline void _HBMemoryBarrier (void) { } typedef LONG hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd (&(AI), (V)) +#define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd ((AI), (V)) #define hb_atomic_ptr_impl_get(P) (_HBMemoryBarrier (), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O)) @@ -107,7 +111,7 @@ typedef LONG hb_atomic_int_impl_t; #elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) typedef int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add (&(AI), (V)) +#define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add ((AI), (V)) #define hb_atomic_ptr_impl_get(P) (void *) (__sync_synchronize (), *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) @@ -119,7 +123,7 @@ typedef int hb_atomic_int_impl_t; #include typedef unsigned int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) +#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv ((AI), (V)) - (V)) #define hb_atomic_ptr_impl_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) @@ -136,7 +140,7 @@ typedef unsigned int hb_atomic_int_impl_t; typedef int32_t hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), &(AI)) - (V)) +#define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), (AI)) - (V)) #define hb_atomic_ptr_impl_get(P) (OSMemoryBarrier (), (void *) *(P)) #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) @@ -169,7 +173,7 @@ static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { } typedef int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add (&(AI), (V)) +#define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add ((AI), (V)) #define hb_atomic_ptr_impl_get(P) (__sync(), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) @@ -179,7 +183,7 @@ typedef int hb_atomic_int_impl_t; #define HB_ATOMIC_INT_NIL 1 /* Warn that fallback implementation is in use. */ typedef volatile int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) +#define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) #define hb_atomic_ptr_impl_get(P) ((void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false) @@ -188,7 +192,7 @@ typedef volatile int hb_atomic_int_impl_t; #else /* HB_NO_MT */ typedef int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) +#define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) #define hb_atomic_ptr_impl_get(P) ((void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false) @@ -200,15 +204,22 @@ typedef int hb_atomic_int_impl_t; #ifndef HB_ATOMIC_INT_INIT #define HB_ATOMIC_INT_INIT(V) {V} #endif +#ifndef hb_atomic_int_impl_set_relaxed +#define hb_atomic_int_impl_set_relaxed(AI, V) ((AI) = (V)) +#endif +#ifndef hb_atomic_int_impl_get_relaxed +#define hb_atomic_int_impl_get_relaxed(AI) (AI) +#endif + struct hb_atomic_int_t { mutable hb_atomic_int_impl_t v; - inline void set_unsafe (int v_) { v = v_; } - inline int get_unsafe (void) const { return v; } - inline int inc (void) { return hb_atomic_int_impl_add (v, 1); } - inline int dec (void) { return hb_atomic_int_impl_add (v, -1); } + inline void set_relaxed (int v_) { hb_atomic_int_impl_set_relaxed (&v, v_); } + inline int get_relaxed (void) const { return hb_atomic_int_impl_get_relaxed (&v); } + inline int inc (void) { return hb_atomic_int_impl_add (&v, 1); } + inline int dec (void) { return hb_atomic_int_impl_add (&v, -1); } }; diff --git a/src/hb-common.cc b/src/hb-common.cc index 8ec269eb1..bab1a6634 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -37,7 +37,7 @@ /* hb_options_t */ -hb_options_union_t _hb_options; +hb_atomic_int_t _hb_options; void _hb_options_init (void) @@ -50,7 +50,7 @@ _hb_options_init (void) u.opts.uniscribe_bug_compatible = c && strstr (c, "uniscribe-bug-compatible"); /* This is idempotent and threadsafe. */ - _hb_options = u; + _hb_options.set_relaxed (u.i); } diff --git a/src/hb-debug.hh b/src/hb-debug.hh index ae0b6774d..9056ffca2 100644 --- a/src/hb-debug.hh +++ b/src/hb-debug.hh @@ -28,6 +28,7 @@ #define HB_DEBUG_HH #include "hb-private.hh" +#include "hb-atomic-private.hh" #include "hb-dsalgs.hh" @@ -35,6 +36,47 @@ #define HB_DEBUG 0 #endif + +/* + * Global runtime options. + */ + +struct hb_options_t +{ + unsigned int unused : 1; /* In-case sign bit is here. */ + unsigned int initialized : 1; + unsigned int uniscribe_bug_compatible : 1; +}; + +union hb_options_union_t { + int i; + hb_options_t opts; +}; +static_assert ((sizeof (hb_atomic_int_t) >= sizeof (hb_options_union_t)), ""); + +HB_INTERNAL void +_hb_options_init (void); + +extern HB_INTERNAL hb_atomic_int_t _hb_options; + +static inline hb_options_t +hb_options (void) +{ + /* Make a local copy, so we can access bitfield threadsafely. */ + hb_options_union_t u; + u.i = _hb_options.get_relaxed (); + + if (unlikely (!u.i)) + _hb_options_init (); + + return u.opts; +} + + +/* + * Debug output (needs enabling at compile time.) + */ + static inline bool _hb_debug (unsigned int level, unsigned int max_level) diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh index 8199c4b84..36d27a891 100644 --- a/src/hb-object-private.hh +++ b/src/hb-object-private.hh @@ -47,14 +47,14 @@ struct hb_reference_count_t { hb_atomic_int_t ref_count; - inline void init (int v) { ref_count.set_unsafe (v); } - inline int get_unsafe (void) const { return ref_count.get_unsafe (); } + inline void init (int v) { ref_count.set_relaxed (v); } + inline int get_relaxed (void) const { return ref_count.get_relaxed (); } inline int inc (void) { return ref_count.inc (); } inline int dec (void) { return ref_count.dec (); } - inline void fini (void) { ref_count.set_unsafe (HB_REFERENCE_COUNT_POISON_VALUE); } + inline void fini (void) { ref_count.set_relaxed (HB_REFERENCE_COUNT_POISON_VALUE); } - inline bool is_inert (void) const { return ref_count.get_unsafe () == HB_REFERENCE_COUNT_INERT_VALUE; } - inline bool is_valid (void) const { return ref_count.get_unsafe () > 0; } + inline bool is_inert (void) const { return ref_count.get_relaxed () == HB_REFERENCE_COUNT_INERT_VALUE; } + inline bool is_valid (void) const { return ref_count.get_relaxed () > 0; } }; @@ -111,7 +111,7 @@ static inline void hb_object_trace (const Type *obj, const char *function) DEBUG_MSG (OBJECT, (void *) obj, "%s refcount=%d", function, - obj ? obj->header.ref_count.get_unsafe () : 0); + obj ? obj->header.ref_count.get_relaxed () : 0); } template diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 25cb05c18..b52656f44 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -251,10 +251,10 @@ struct indic_shape_plan_t { ASSERT_POD (); - inline bool get_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const + inline bool load_virama_glyph (hb_font_t *font, hb_codepoint_t *pglyph) const { - hb_codepoint_t glyph = virama_glyph; - if (unlikely (virama_glyph == (hb_codepoint_t) -1)) + hb_codepoint_t glyph = virama_glyph.get_relaxed (); + if (unlikely (glyph == (hb_codepoint_t) -1)) { if (!config->virama || !font->get_nominal_glyph (config->virama, &glyph)) glyph = 0; @@ -262,8 +262,8 @@ struct indic_shape_plan_t * Maybe one day... */ /* Our get_nominal_glyph() function needs a font, so we can't get the virama glyph - * during shape planning... Instead, overwrite it here. It's safe. Don't worry! */ - virama_glyph = glyph; + * during shape planning... Instead, overwrite it here. */ + virama_glyph.set_relaxed ((int) glyph); } *pglyph = glyph; @@ -273,7 +273,7 @@ struct indic_shape_plan_t const indic_config_t *config; bool is_old_spec; - mutable hb_codepoint_t virama_glyph; + mutable hb_atomic_int_t virama_glyph; would_substitute_feature_t rphf; would_substitute_feature_t pref; @@ -298,7 +298,7 @@ data_create_indic (const hb_ot_shape_plan_t *plan) } indic_plan->is_old_spec = indic_plan->config->has_old_spec && ((plan->map.chosen_script[0] & 0x000000FFu) != '2'); - indic_plan->virama_glyph = (hb_codepoint_t) -1; + indic_plan->virama_glyph.set_relaxed (-1); /* Use zero-context would_substitute() matching for new-spec of the main * Indic scripts, and scripts with one spec only, but not for old-specs. @@ -419,7 +419,7 @@ update_consonant_positions (const hb_ot_shape_plan_t *plan, return; hb_codepoint_t virama; - if (indic_plan->get_virama_glyph (font, &virama)) + if (indic_plan->load_virama_glyph (font, &virama)) { hb_face_t *face = font->face; unsigned int count = buffer->len; @@ -1040,9 +1040,11 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, * phase, and that might have messed up our properties. Recover * from a particular case of that where we're fairly sure that a * class of OT_H is desired but has been lost. */ - if (indic_plan->virama_glyph) + /* We don't call load_virama_glyph(), since we know it's already + * loaded. */ + hb_codepoint_t virama_glyph = indic_plan->virama_glyph.get_relaxed (); + if (virama_glyph) { - unsigned int virama_glyph = indic_plan->virama_glyph; for (unsigned int i = start; i < end; i++) if (info[i].codepoint == virama_glyph && _hb_glyph_info_ligated (&info[i]) && diff --git a/src/hb-private.hh b/src/hb-private.hh index a0bd99425..32e1edffe 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -525,34 +525,6 @@ hb_in_ranges (T u, T lo1, T hi1, T lo2, T hi2, T lo3, T hi3) #define FLAG_RANGE(x,y) (ASSERT_STATIC_EXPR_ZERO ((x) < (y)) + FLAG(y+1) - FLAG(x)) -/* Global runtime options. */ - -struct hb_options_t -{ - unsigned int initialized : 1; - unsigned int uniscribe_bug_compatible : 1; -}; - -union hb_options_union_t { - unsigned int i; - hb_options_t opts; -}; -static_assert ((sizeof (int) == sizeof (hb_options_union_t)), ""); - -HB_INTERNAL void -_hb_options_init (void); - -extern HB_INTERNAL hb_options_union_t _hb_options; - -static inline hb_options_t -hb_options (void) -{ - if (unlikely (!_hb_options.i)) - _hb_options_init (); - - return _hb_options.opts; -} - /* Size signifying variable-sized array */ #define VAR 1 From 63c74e8d1d85067cbeffe635eb5ed4e8aa130776 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 22:21:21 -0700 Subject: [PATCH 23/50] [atomic] Fix fallback impl --- src/hb-atomic-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index bad409bb6..2e73cd855 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -205,10 +205,10 @@ typedef int hb_atomic_int_impl_t; #define HB_ATOMIC_INT_INIT(V) {V} #endif #ifndef hb_atomic_int_impl_set_relaxed -#define hb_atomic_int_impl_set_relaxed(AI, V) ((AI) = (V)) +#define hb_atomic_int_impl_set_relaxed(AI, V) (*(AI) = (V)) #endif #ifndef hb_atomic_int_impl_get_relaxed -#define hb_atomic_int_impl_get_relaxed(AI) (AI) +#define hb_atomic_int_impl_get_relaxed(AI) (*(AI)) #endif From d7a15799d40dac1f9521674a82c3293a7cb42ee4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 22:28:28 -0700 Subject: [PATCH 24/50] [gobject] Hook up hb_map_t --- docs/harfbuzz-sections.txt | 2 ++ src/hb-gobject-structs.cc | 1 + src/hb-gobject-structs.h | 4 ++++ src/hb-map.cc | 6 ++---- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 5cf5a884e..db4e71af9 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -327,6 +327,7 @@ HB_GOBJECT_TYPE_FACE HB_GOBJECT_TYPE_FONT HB_GOBJECT_TYPE_FONT_FUNCS HB_GOBJECT_TYPE_GLYPH_FLAGS +HB_GOBJECT_TYPE_MAP HB_GOBJECT_TYPE_MEMORY_MODE HB_GOBJECT_TYPE_OT_LAYOUT_GLYPH_CLASS HB_GOBJECT_TYPE_OT_MATH_CONSTANT @@ -358,6 +359,7 @@ hb_gobject_face_get_type hb_gobject_font_funcs_get_type hb_gobject_font_get_type hb_gobject_glyph_flags_get_type +hb_gobject_map_get_type hb_gobject_memory_mode_get_type hb_gobject_ot_layout_glyph_class_get_type hb_gobject_ot_math_constant_get_type diff --git a/src/hb-gobject-structs.cc b/src/hb-gobject-structs.cc index a96c35804..0c8e55733 100644 --- a/src/hb-gobject-structs.cc +++ b/src/hb-gobject-structs.cc @@ -71,6 +71,7 @@ HB_DEFINE_OBJECT_TYPE (face) HB_DEFINE_OBJECT_TYPE (font) HB_DEFINE_OBJECT_TYPE (font_funcs) HB_DEFINE_OBJECT_TYPE (set) +HB_DEFINE_OBJECT_TYPE (map) HB_DEFINE_OBJECT_TYPE (shape_plan) HB_DEFINE_OBJECT_TYPE (unicode_funcs) HB_DEFINE_VALUE_TYPE (feature) diff --git a/src/hb-gobject-structs.h b/src/hb-gobject-structs.h index 302dc9584..ccc06a5e2 100644 --- a/src/hb-gobject-structs.h +++ b/src/hb-gobject-structs.h @@ -89,6 +89,10 @@ HB_EXTERN GType hb_gobject_set_get_type (void); #define HB_GOBJECT_TYPE_SET (hb_gobject_set_get_type ()) +HB_EXTERN GType +hb_gobject_map_get_type (void); +#define HB_GOBJECT_TYPE_SET (hb_gobject_map_get_type ()) + HB_EXTERN GType hb_gobject_shape_plan_get_type (void); #define HB_GOBJECT_TYPE_SHAPE_PLAN (hb_gobject_shape_plan_get_type ()) diff --git a/src/hb-map.cc b/src/hb-map.cc index e3ddae413..138a85612 100644 --- a/src/hb-map.cc +++ b/src/hb-map.cc @@ -157,8 +157,6 @@ hb_map_allocation_successful (const hb_map_t *map) * * * - * Return value: - * * Since: 1.7.7 **/ void @@ -188,7 +186,7 @@ hb_map_get (const hb_map_t *map, /** * hb_map_del: * @map: a map. - * @codepoint: + * @key: * * * @@ -204,7 +202,7 @@ hb_map_del (hb_map_t *map, /** * hb_map_has: * @map: a map. - * @codepoint: + * @key: * * * From 896ff15ae60a4a4b94c62946e69196b877839bb5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 22:51:38 -0700 Subject: [PATCH 25/50] [atomic] Fix get() impl Originally, glib's atomic_get was implemented as "memory_barrier; load". I copied this into cairo, fontconfig, and harfbuzz. However, that's wrong. Correct way is "load; memory_barrier". The details are long and hard to fully grasp. Best to read: https://www.kernel.org/doc/Documentation/memory-barriers.txt Also see my report against GNOME: https://gitlab.gnome.org/GNOME/glib/issues/1449 Note that this is irrelevant if C++11-like atomic ops are available. --- src/hb-atomic-private.hh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 2e73cd855..ef72872a2 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -89,11 +89,10 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #include -/* MinGW has a convoluted history of supporting MemoryBarrier - * properly. As such, define a function to wrap the whole - * thing. */ -static inline void _HBMemoryBarrier (void) { +static inline void _hb_memory_barrier (void) +{ #if !defined(MemoryBarrier) + /* MinGW has a convoluted history of supporting MemoryBarrier. */ long dummy = 0; InterlockedExchange (&dummy, 1); #else @@ -104,7 +103,6 @@ static inline void _HBMemoryBarrier (void) { typedef LONG hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd ((AI), (V)) -#define hb_atomic_ptr_impl_get(P) (_HBMemoryBarrier (), (void *) *(P)) #define hb_atomic_ptr_impl_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O)) @@ -113,7 +111,8 @@ typedef LONG hb_atomic_int_impl_t; typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add ((AI), (V)) -#define hb_atomic_ptr_impl_get(P) (void *) (__sync_synchronize (), *(P)) +static inline void _hb_memory_barrier (void) { __sync_synchronize (); } + #define hb_atomic_ptr_impl_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) @@ -125,7 +124,8 @@ typedef int hb_atomic_int_impl_t; typedef unsigned int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv ((AI), (V)) - (V)) -#define hb_atomic_ptr_impl_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P)) +static inline void _hb_memory_barrier (void) { __machine_rw_barrier (); } + #define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) @@ -142,7 +142,8 @@ typedef unsigned int hb_atomic_int_impl_t; typedef int32_t hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), (AI)) - (V)) -#define hb_atomic_ptr_impl_get(P) (OSMemoryBarrier (), (void *) *(P)) +static inline void _hb_memory_barrier (void) { OSMemoryBarrier (); } + #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) #define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) #else @@ -175,7 +176,8 @@ static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add ((AI), (V)) -#define hb_atomic_ptr_impl_get(P) (__sync(), (void *) *(P)) +static inline void _hb_memory_barrier (void) { __sync(); } + #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) #elif !defined(HB_NO_MT) @@ -185,7 +187,7 @@ typedef int hb_atomic_int_impl_t; typedef volatile int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) -#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) +static inline void _hb_memory_barrier (void) {} #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false) @@ -194,7 +196,8 @@ typedef volatile int hb_atomic_int_impl_t; typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) -#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) +static inline void _hb_memory_barrier (void) {} + #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false) @@ -210,6 +213,9 @@ typedef int hb_atomic_int_impl_t; #ifndef hb_atomic_int_impl_get_relaxed #define hb_atomic_int_impl_get_relaxed(AI) (*(AI)) #endif +#ifndef hb_atomic_ptr_impl_get +inline void *hb_atomic_ptr_impl_get (void **P) { void *v = *P; _hb_memory_barrier (); return v; } +#endif struct hb_atomic_int_t From fd638d215feb058c2294e447cc68f6f50e2b481d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 23:00:15 -0700 Subject: [PATCH 26/50] [atomic] Add XXX items around Solaris ops Since add_int and cas are both read-modify-write, I wonder if we also need a barrier after them. --- src/hb-atomic-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index ef72872a2..0d0badfb4 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -122,11 +122,11 @@ static inline void _hb_memory_barrier (void) { __sync_synchronize (); } #include typedef unsigned int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv ((AI), (V)) - (V)) +#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv ((AI), (V)) - (V) /* XXX barrier again? */) static inline void _hb_memory_barrier (void) { __machine_rw_barrier (); } -#define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false /* XXX barrier again? */) #elif !defined(HB_NO_MT) && defined(__APPLE__) From ad275627425c9b3c4fb1e69aa408067bd0bb77da Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 31 Jul 2018 23:01:05 -0700 Subject: [PATCH 27/50] [atomic] On IBM, use light-weight sync for everything lwsync() is a full read/write-barrier. That's all we need, never need sync(). I'm not sure why an isync() was used in fetch_and_add, but since that's a read-modify-write, I just changed it to have lwsync() on both sides. --- src/hb-atomic-private.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 0d0badfb4..f60c46e30 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -163,20 +163,20 @@ static inline void _hb_memory_barrier (void) { OSMemoryBarrier (); } static inline int _hb_fetch_and_add(volatile int* AI, unsigned int V) { __lwsync(); int result = __fetch_and_add(AI, V); - __isync(); + __lwsync(); return result; } static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { - __sync(); + __lwsync(); int result = __compare_and_swaplp (P, &O, N); - __sync(); + __lwsync(); return result; } typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add ((AI), (V)) -static inline void _hb_memory_barrier (void) { __sync(); } +static inline void _hb_memory_barrier (void) { __lwsync(); } #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) From 7a4d576e81c4de68ea66b2d5fe7712e29d715272 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 00:19:25 -0700 Subject: [PATCH 28/50] [gobject] Fix copy/paste error --- src/hb-gobject-structs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-gobject-structs.h b/src/hb-gobject-structs.h index ccc06a5e2..800beede0 100644 --- a/src/hb-gobject-structs.h +++ b/src/hb-gobject-structs.h @@ -91,7 +91,7 @@ hb_gobject_set_get_type (void); HB_EXTERN GType hb_gobject_map_get_type (void); -#define HB_GOBJECT_TYPE_SET (hb_gobject_map_get_type ()) +#define HB_GOBJECT_TYPE_MAP (hb_gobject_map_get_type ()) HB_EXTERN GType hb_gobject_shape_plan_get_type (void); From dfc86e4b35ffdeb8f73e83511712e75413bbb7d9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 00:22:18 -0700 Subject: [PATCH 29/50] [atomic] Fix cast to fallback ptr_get() --- src/hb-atomic-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index f60c46e30..852b2242e 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -229,7 +229,7 @@ struct hb_atomic_int_t }; -#define hb_atomic_ptr_get(P) hb_atomic_ptr_impl_get(P) +#define hb_atomic_ptr_get(P) hb_atomic_ptr_impl_get((void **) P) #define hb_atomic_ptr_cmpexch(P,O,N) hb_atomic_ptr_impl_cmpexch((P),(O),(N)) From 1a7fed631880fff8a947ebec9c7427efff581916 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 1 Aug 2018 12:15:44 +0430 Subject: [PATCH 30/50] Revert "Add a new API, hb_ot_layout_get_feature_name_ids (#976)" (#1121) This reverts commit 0c1b287b72e91e0898d75acb5d5acf1c6b9a7498. --- docs/harfbuzz-sections.txt | 1 - src/hb-ot-layout-common-private.hh | 14 ----- src/hb-ot-layout.cc | 86 ------------------------------ src/hb-ot-layout.h | 8 --- 4 files changed, 109 deletions(-) diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index db4e71af9..65ea1f909 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -453,7 +453,6 @@ hb_ot_layout_collect_features hb_ot_layout_feature_get_lookups hb_ot_layout_feature_with_variations_get_lookups hb_ot_layout_get_attach_points -hb_ot_layout_get_feature_name_ids hb_ot_layout_get_glyph_class hb_ot_layout_get_glyphs_in_class hb_ot_layout_get_ligature_carets diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 76ad30cf1..2da6e315c 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -494,20 +494,6 @@ struct FeatureParams return Null(FeatureParamsSize); } - inline const FeatureParamsStylisticSet& get_stylistic_set_params (hb_tag_t tag) const - { - if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */ - return u.stylisticSet; - return Null(FeatureParamsStylisticSet); - } - - inline const FeatureParamsCharacterVariants& get_character_variants_params (hb_tag_t tag) const - { - if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */ - return u.characterVariants; - return Null(FeatureParamsCharacterVariants); - } - private: union { FeatureParamsSize size; diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index db7823480..1cb0c3ad9 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1029,24 +1029,6 @@ hb_ot_layout_position_finish_offsets (hb_font_t *font, hb_buffer_t *buffer) OT::GPOS::position_finish_offsets (font, buffer); } -static const OT::FeatureParams& -_get_gsubgpos_matched_feature_params (hb_face_t *face, hb_tag_t feature) -{ - const OT::GSUB &gsub = _get_gsub (face); - unsigned int gsub_num_features = gsub.get_feature_count (); - for (unsigned int i = 0; i < gsub_num_features; i++) - if (feature == gsub.get_feature_tag (i)) - return gsub.get_feature (i).get_feature_params (); - - const OT::GPOS &gpos = _get_gpos (face); - unsigned int gpos_num_features = gpos.get_feature_count (); - for (unsigned int i = 0; i < gpos_num_features; i++) - if (feature == gpos.get_feature_tag (i)) - return gpos.get_feature (i).get_feature_params (); - - return Null (OT::FeatureParams); -} - /** * hb_ot_layout_get_size_params: * @@ -1097,74 +1079,6 @@ hb_ot_layout_get_size_params (hb_face_t *face, return false; } -/** - * hb_ot_layout_get_feature_name_ids: - * @face: #hb_face_t to work upon - * @feature: ssXX and cvXX tag - * @label_id: (out) (allow-none): The ‘name’ table name ID that specifies a string - * for a user-interface label for this feature. (May be NULL.) - * @tooltip_id: (out) (allow-none): The ‘name’ table name ID that specifies a string - * that an application can use for tooltip text for this - * feature. (May be NULL.) - * @sample_id: (out) (allow-none): The ‘name’ table name ID that specifies sample text - * that illustrates the effect of this feature. (May be NULL.) - * @num_named_parameters: (out) (allow-none): Number of named parameters. (May be zero.) - * @first_param_id: (out) (allow-none): The first ‘name’ table name ID used to specify - * strings for user-interface labels for the feature - * parameters. (Must be zero if numParameters is zero.) - * - * Return value: true if could find any feature with the tag, false otherwise - * - * Since: REPLACEME - **/ -hb_bool_t -hb_ot_layout_get_feature_name_ids (hb_face_t *face, - hb_tag_t feature, - unsigned int *label_id, /* OUT. May be nullptr */ - unsigned int *tooltip_id, /* OUT. May be nullptr */ - unsigned int *sample_id, /* OUT. May be nullptr */ - unsigned int *num_named_parameters, /* OUT. May be nullptr */ - unsigned int *first_param_id /* OUT. May be nullptr */) -{ - const OT::FeatureParams &feature_params = - _get_gsubgpos_matched_feature_params (face, feature); - if (&feature_params != &Null (OT::FeatureParams)) - { - const OT::FeatureParamsStylisticSet& ss_params = - feature_params.get_stylistic_set_params (feature); - if (&ss_params != &Null (OT::FeatureParamsStylisticSet)) /* ssXX */ - { -#define PARAM(a, A) if (a) *a = A - PARAM(label_id, ss_params.uiNameID); - // ssXX features don't have the rest - PARAM(tooltip_id, 0); - PARAM(sample_id, 0); - PARAM(num_named_parameters, 0); - PARAM(first_param_id, 0); - return true; - } - const OT::FeatureParamsCharacterVariants& cv_params = - feature_params.get_character_variants_params (feature); - if (&cv_params != &Null (OT::FeatureParamsCharacterVariants)) /* cvXX */ - { - PARAM(label_id, cv_params.featUILableNameID); - PARAM(tooltip_id, cv_params.featUITooltipTextNameID); - PARAM(sample_id, cv_params.sampleTextNameID); - PARAM(num_named_parameters, cv_params.numNamedParameters); - PARAM(first_param_id, cv_params.firstParamUILabelNameID); - return true; - } - } - - PARAM(label_id, 0); - PARAM(tooltip_id, 0); - PARAM(sample_id, 0); - PARAM(num_named_parameters, 0); - PARAM(first_param_id, 0); -#undef PARAM - return false; -} - /* * Parts of different types are implemented here such that they have direct diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h index f81b9dd41..586fb1517 100644 --- a/src/hb-ot-layout.h +++ b/src/hb-ot-layout.h @@ -329,14 +329,6 @@ hb_ot_layout_get_size_params (hb_face_t *face, unsigned int *range_start, /* OUT. May be NULL */ unsigned int *range_end /* OUT. May be NULL */); -HB_EXTERN hb_bool_t -hb_ot_layout_get_feature_name_ids (hb_face_t *face, - hb_tag_t feature, - unsigned int *label_id /* OUT. May be NULL */, - unsigned int *tooltip_id /* OUT. May be NULL */, - unsigned int *sample_id /* OUT. May be NULL */, - unsigned int *num_named_parameters /* OUT. May be NULL */, - unsigned int *first_param_id /* OUT. May be NULL */); /* * BASE From 28d03a8afcc1f0ba6d9d0d88f669cc53bb030dd8 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 2 Aug 2018 00:11:43 +0430 Subject: [PATCH 31/50] [ci] Fix Appveyor bot (#1123) --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 6250a91ed..cc4acec1c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -44,6 +44,7 @@ build_script: - 'if "%compiler%"=="msvc" msbuild harfbuzz.sln /p:Configuration=%configuration% /p:Platform=%platform%' - 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" ctest --output-on-failure -C %configuration%' + - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syyu mingw-w64-$MSYS2_ARCH-gcc"' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-{freetype,cairo,icu,gettext,gobject-introspection,gcc,gcc-libs,glib2,graphite2,pkg-config,python2}"' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "curl https://raw.githubusercontent.com/mirror/mingw-w64/023eb04c396d4e8d8fcf604cfababc53dae13398/mingw-w64-headers/include/dwrite_1.h > %MINGW_PREFIX%/%MINGW_CHOST%/include/dwrite_1.h"' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --with-directwrite --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || .ci/fail.sh"' From 006d4f031a30dd04f5bb9c3d1daca187ef6b7f1e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 13:59:31 -0700 Subject: [PATCH 32/50] [atomic] Some more minor tweaks --- src/hb-atomic-private.hh | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 852b2242e..3c321020a 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -99,6 +99,7 @@ static inline void _hb_memory_barrier (void) MemoryBarrier (); #endif } +#define _hb_memory_barrier() _hb_memory_barrier () typedef LONG hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd ((AI), (V)) @@ -108,11 +109,11 @@ typedef LONG hb_atomic_int_impl_t; #elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) +#define _hb_memory_barrier() __sync_synchronize () + typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add ((AI), (V)) -static inline void _hb_memory_barrier (void) { __sync_synchronize (); } - #define hb_atomic_ptr_impl_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) @@ -121,11 +122,13 @@ static inline void _hb_memory_barrier (void) { __sync_synchronize (); } #include #include +#define _hb_memory_r_barrier() __machine_r_barrier () +#define _hb_memory_w_barrier() __machine_r_barrier () +#define _hb_memory_barrier() __machine_rw_barrier () + typedef unsigned int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv ((AI), (V)) - (V) /* XXX barrier again? */) -static inline void _hb_memory_barrier (void) { __machine_rw_barrier (); } - #define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false /* XXX barrier again? */) @@ -138,12 +141,11 @@ static inline void _hb_memory_barrier (void) { __machine_rw_barrier (); } #include #endif +#define _hb_memory_barrier() OSMemoryBarrier () typedef int32_t hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), (AI)) - (V)) -static inline void _hb_memory_barrier (void) { OSMemoryBarrier (); } - #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) #define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) #else @@ -159,7 +161,6 @@ static inline void _hb_memory_barrier (void) { OSMemoryBarrier (); } #include - static inline int _hb_fetch_and_add(volatile int* AI, unsigned int V) { __lwsync(); int result = __fetch_and_add(AI, V); @@ -173,21 +174,23 @@ static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { return result; } +#define _hb_memory_barrier() __lwsync () + typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add ((AI), (V)) -static inline void _hb_memory_barrier (void) { __lwsync(); } - #define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) + #elif !defined(HB_NO_MT) #define HB_ATOMIC_INT_NIL 1 /* Warn that fallback implementation is in use. */ +#define _hb_memory_barrier() + typedef volatile int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) -static inline void _hb_memory_barrier (void) {} #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false) @@ -196,7 +199,7 @@ static inline void _hb_memory_barrier (void) {} typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V)) -static inline void _hb_memory_barrier (void) {} +#define _hb_memory_barrier() #define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false) @@ -204,6 +207,12 @@ static inline void _hb_memory_barrier (void) {} #endif +#ifndef _hb_memory_r_barrier +#define _hb_memory_r_barrier() _hb_memory_barrier () +#endif +#ifndef _hb_memory_w_barrier +#define _hb_memory_w_barrier() _hb_memory_barrier () +#endif #ifndef HB_ATOMIC_INT_INIT #define HB_ATOMIC_INT_INIT(V) {V} #endif From 19b98348ffc660501e518bf48cd63d232f7585e7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 13:59:59 -0700 Subject: [PATCH 33/50] [atomic] Use read-barrier for get() --- src/hb-atomic-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 3c321020a..bd28a5635 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -223,7 +223,7 @@ typedef int hb_atomic_int_impl_t; #define hb_atomic_int_impl_get_relaxed(AI) (*(AI)) #endif #ifndef hb_atomic_ptr_impl_get -inline void *hb_atomic_ptr_impl_get (void **P) { void *v = *P; _hb_memory_barrier (); return v; } +inline void *hb_atomic_ptr_impl_get (void **P) { void *v = *P; _hb_memory_r_barrier (); return v; } #endif From 2093a3e0cbb98c2daa39f308d50a12f0a719bc81 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 14:00:46 -0700 Subject: [PATCH 34/50] [atomic] Oops --- src/hb-atomic-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index bd28a5635..3239193a2 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -123,7 +123,7 @@ typedef int hb_atomic_int_impl_t; #include #define _hb_memory_r_barrier() __machine_r_barrier () -#define _hb_memory_w_barrier() __machine_r_barrier () +#define _hb_memory_w_barrier() __machine_w_barrier () #define _hb_memory_barrier() __machine_rw_barrier () typedef unsigned int hb_atomic_int_impl_t; From 19dfaa351568887a74cee2c46d6acfcc3fa718ff Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 14:02:39 -0700 Subject: [PATCH 35/50] [atomic] Remove volatile from IBM impl signature --- src/hb-atomic-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 3239193a2..0e7a8414d 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -161,13 +161,13 @@ typedef int32_t hb_atomic_int_impl_t; #include -static inline int _hb_fetch_and_add(volatile int* AI, unsigned int V) { +static inline int _hb_fetch_and_add (int* AI, unsigned int V) { __lwsync(); int result = __fetch_and_add(AI, V); __lwsync(); return result; } -static inline int _hb_compare_and_swaplp(volatile long* P, long O, long N) { +static inline int _hb_compare_and_swaplp (long* P, long O, long N) { __lwsync(); int result = __compare_and_swaplp (P, &O, N); __lwsync(); From 13f4c137c686aed5c2888b5c47d9f16892be0d5e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 14:13:59 -0700 Subject: [PATCH 36/50] [atomic] Fix Solaris ones to add proper barriers --- src/hb-atomic-private.hh | 56 +++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 0e7a8414d..0b043e698 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -62,7 +62,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) const void *O = O_; // Need lvalue return __atomic_compare_exchange_n ((void **) P, (void **) &O, (void *) N, true, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED); } -#define hb_atomic_ptr_impl_cmpexch(P,O,N) (_hb_atomic_ptr_impl_cmplexch ((const void **) (P), (O), (N))) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_atomic_ptr_impl_cmplexch ((const void **) (P), (O), (N)) #elif !defined(HB_NO_MT) && __cplusplus >= 201103L @@ -82,7 +82,7 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) const void *O = O_; // Need lvalue return reinterpret_cast *> (P)->compare_exchange_weak (O, N, std::memory_order_acq_rel, std::memory_order_relaxed); } -#define hb_atomic_ptr_impl_cmpexch(P,O,N) (_hb_atomic_ptr_impl_cmplexch ((const void **) (P), (O), (N))) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_atomic_ptr_impl_cmplexch ((const void **) (P), (O), (N)) #elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__)) @@ -127,9 +127,25 @@ typedef int hb_atomic_int_impl_t; #define _hb_memory_barrier() __machine_rw_barrier () typedef unsigned int hb_atomic_int_impl_t; -#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv ((AI), (V)) - (V) /* XXX barrier again? */) -#define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false /* XXX barrier again? */) +static inline int _hb_fetch_and_add (hb_atomic_int_impl_t *AI, int V) +{ + _hb_memory_w_barrier (); + int result = atomic_add_int_nv (AI, V); + _hb_memory_r_barrier (); + return result; +} +static inline bool _hb_compare_and_swap_ptr (const void **P, const void *O, const void *N) +{ + _hb_memory_w_barrier (); + int result = atomic_cas_ptr ((void **) P, (void *) O, (void *) N) == (void *) O; + _hb_memory_r_barrier (); + return result; +} + +#define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add ((AI), (V)) + +#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swap_ptr ((const void **) (P), (O), (N)) #elif !defined(HB_NO_MT) && defined(__APPLE__) @@ -161,25 +177,29 @@ typedef int32_t hb_atomic_int_impl_t; #include -static inline int _hb_fetch_and_add (int* AI, unsigned int V) { - __lwsync(); - int result = __fetch_and_add(AI, V); - __lwsync(); - return result; -} -static inline int _hb_compare_and_swaplp (long* P, long O, long N) { - __lwsync(); - int result = __compare_and_swaplp (P, &O, N); - __lwsync(); - return result; -} - #define _hb_memory_barrier() __lwsync () typedef int hb_atomic_int_impl_t; + +static inline int _hb_fetch_and_add (hb_atomic_int_impl_t *AI, int V) +{ + _hb_memory_barrier (); + int result = __fetch_and_add (AI, V); + _hb_memory_barrier (); + return result; +} +static inline bool _hb_compare_and_swaplp (long *P, long O, long N) +{ + _hb_memory_barrier (); + bool result = __compare_and_swaplp (P, &O, N); + _hb_memory_barrier (); + return result; +} + #define hb_atomic_int_impl_add(AI, V) _hb_fetch_and_add ((AI), (V)) -#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long*)(P), (long)(O), (long)(N)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) _hb_compare_and_swaplp ((long *) (P), (long) (O), (long) (N)) +static_assert ((sizeof (long) == sizeof (void *)), ""); #elif !defined(HB_NO_MT) From 44d1fb37efa20852cc466c0f0bba95dbd24ce288 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 14:51:51 -0700 Subject: [PATCH 37/50] 1.8.5 --- NEWS | 8 ++++++++ configure.ac | 2 +- src/hb-ot-layout.cc | 2 +- src/hb-version.h | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index fce43a364..13aa66295 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +Overview of changes leading to 1.8.5 +Wednesday, August 1, 2018 +==================================== +- Major Khmer shaper improvements to better match Microsoft. +- Indic bug fixes. +- Internal improvements to atomic operations. + + Overview of changes leading to 1.8.4 Tuesday, July 17, 2018 ==================================== diff --git a/configure.ac b/configure.ac index 0dd70e68f..c439f54d0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([HarfBuzz], - [1.8.4], + [1.8.5], [https://github.com/harfbuzz/harfbuzz/issues/new], [harfbuzz], [http://harfbuzz.org/]) diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 1cb0c3ad9..c790c3ceb 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -765,7 +765,7 @@ _hb_ot_layout_collect_features_languages (hb_face_t *face, /** * hb_ot_layout_collect_features: * - * Since: REPLACEME + * Since: 1.8.5 **/ void hb_ot_layout_collect_features (hb_face_t *face, diff --git a/src/hb-version.h b/src/hb-version.h index 09e3c2c0b..c5092c780 100644 --- a/src/hb-version.h +++ b/src/hb-version.h @@ -38,9 +38,9 @@ HB_BEGIN_DECLS #define HB_VERSION_MAJOR 1 #define HB_VERSION_MINOR 8 -#define HB_VERSION_MICRO 4 +#define HB_VERSION_MICRO 5 -#define HB_VERSION_STRING "1.8.4" +#define HB_VERSION_STRING "1.8.5" #define HB_VERSION_ATLEAST(major,minor,micro) \ ((major)*10000+(minor)*100+(micro) <= \ From 1a624c6e06763a8a61bc686d2d44272d4ef50d4a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 17:53:30 -0700 Subject: [PATCH 38/50] Add comment re (our only) race condition --- src/hb-shaper-private.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hb-shaper-private.hh b/src/hb-shaper-private.hh index 4bd36b5ba..a7ca36c61 100644 --- a/src/hb-shaper-private.hh +++ b/src/hb-shaper-private.hh @@ -89,7 +89,13 @@ HB_SHAPER_DATA_ENSURE_FUNC(shaper, object) (hb_##object##_t *object) \ /* Note that evaluating condition above can be dangerous if another thread \ * got here first and destructed data. That's, as always, bad use pattern. \ * If you modify the font (change font size), other threads must not be \ - * using it at the same time. */ \ + * using it at the same time. However, since this check is delayed to \ + * when one actually tries to shape something, this is a XXX race condition \ + * (and the only know we have that I know of) right now. Ie. you modify the \ + * font size in one thread, then (supposedly safely) try to use it from two \ + * or more threads and BOOM! I'm not sure how to fix this. We want RCU. \ + * Maybe when it doesn't matter when we finally implement AAT shaping, as + * this (condition) is currently only used by hb-coretext. */ \ /* Drop and recreate. */ \ /* If someone dropped it in the mean time, throw it away and don't touch it. \ * Otherwise, destruct it. */ \ From 3d22aefedebb5277c5d79011e48e7be1a26a53c1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 18:03:32 -0700 Subject: [PATCH 39/50] Rename --- src/hb-coretext.cc | 46 ++++++++++++++++++++-------------------- src/hb-directwrite.cc | 28 ++++++++++++------------ src/hb-fallback-shape.cc | 24 ++++++++++----------- src/hb-graphite2.cc | 26 +++++++++++------------ src/hb-ot-shape.cc | 20 ++++++++--------- src/hb-shaper-private.hh | 2 +- src/hb-uniscribe.cc | 34 ++++++++++++++--------------- 7 files changed, 90 insertions(+), 90 deletions(-) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 3bdc3f784..13ab98865 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -269,7 +269,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size) return ct_font; } -hb_coretext_shaper_face_data_t * +hb_coretext_face_data_t * _hb_coretext_shaper_face_data_create (hb_face_t *face) { CGFontRef cg_font = create_cg_font (face); @@ -280,11 +280,11 @@ _hb_coretext_shaper_face_data_create (hb_face_t *face) return nullptr; } - return (hb_coretext_shaper_face_data_t *) cg_font; + return (hb_coretext_face_data_t *) cg_font; } void -_hb_coretext_shaper_face_data_destroy (hb_coretext_shaper_face_data_t *data) +_hb_coretext_shaper_face_data_destroy (hb_coretext_face_data_t *data) { CFRelease ((CGFontRef) data); } @@ -306,7 +306,7 @@ hb_coretext_face_get_cg_font (hb_face_t *face) } -hb_coretext_shaper_font_data_t * +hb_coretext_font_data_t * _hb_coretext_shaper_font_data_create (hb_font_t *font) { hb_face_t *face = font->face; @@ -321,11 +321,11 @@ _hb_coretext_shaper_font_data_create (hb_font_t *font) return nullptr; } - return (hb_coretext_shaper_font_data_t *) ct_font; + return (hb_coretext_font_data_t *) ct_font; } void -_hb_coretext_shaper_font_data_destroy (hb_coretext_shaper_font_data_t *data) +_hb_coretext_shaper_font_data_destroy (hb_coretext_font_data_t *data) { CFRelease ((CTFontRef) data); } @@ -348,7 +348,7 @@ hb_coretext_font_create (CTFontRef ct_font) hb_font_set_ptem (font, coretext_font_size_to_ptem (CTFontGetSize(ct_font))); /* Let there be dragons here... */ - HB_SHAPER_DATA_GET (font) = (hb_coretext_shaper_font_data_t *) CFRetain (ct_font); + HB_SHAPER_DATA_GET (font) = (hb_coretext_font_data_t *) CFRetain (ct_font); return font; } @@ -366,20 +366,20 @@ hb_coretext_font_get_ct_font (hb_font_t *font) * shaper shape_plan data */ -struct hb_coretext_shaper_shape_plan_data_t {}; +struct hb_coretext_shape_plan_data_t {}; -hb_coretext_shaper_shape_plan_data_t * +hb_coretext_shape_plan_data_t * _hb_coretext_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, const hb_feature_t *user_features HB_UNUSED, unsigned int num_user_features HB_UNUSED, const int *coords HB_UNUSED, unsigned int num_coords HB_UNUSED) { - return (hb_coretext_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_coretext_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_coretext_shaper_shape_plan_data_destroy (hb_coretext_shaper_shape_plan_data_t *data HB_UNUSED) +_hb_coretext_shaper_shape_plan_data_destroy (hb_coretext_shape_plan_data_t *data HB_UNUSED) { } @@ -1329,9 +1329,9 @@ HB_SHAPER_DATA_ENSURE_DEFINE(coretext_aat, font) * shaper face data */ -struct hb_coretext_aat_shaper_face_data_t {}; +struct hb_coretext_aat_face_data_t {}; -hb_coretext_aat_shaper_face_data_t * +hb_coretext_aat_face_data_t * _hb_coretext_aat_shaper_face_data_create (hb_face_t *face) { static const hb_tag_t tags[] = {HB_CORETEXT_TAG_MORX, HB_CORETEXT_TAG_MORT, HB_CORETEXT_TAG_KERX}; @@ -1342,7 +1342,7 @@ _hb_coretext_aat_shaper_face_data_create (hb_face_t *face) if (hb_blob_get_length (blob)) { hb_blob_destroy (blob); - return hb_coretext_shaper_face_data_ensure (face) ? (hb_coretext_aat_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED : nullptr; + return hb_coretext_shaper_face_data_ensure (face) ? (hb_coretext_aat_face_data_t *) HB_SHAPER_DATA_SUCCEEDED : nullptr; } hb_blob_destroy (blob); } @@ -1351,7 +1351,7 @@ _hb_coretext_aat_shaper_face_data_create (hb_face_t *face) } void -_hb_coretext_aat_shaper_face_data_destroy (hb_coretext_aat_shaper_face_data_t *data HB_UNUSED) +_hb_coretext_aat_shaper_face_data_destroy (hb_coretext_aat_face_data_t *data HB_UNUSED) { } @@ -1360,16 +1360,16 @@ _hb_coretext_aat_shaper_face_data_destroy (hb_coretext_aat_shaper_face_data_t *d * shaper font data */ -struct hb_coretext_aat_shaper_font_data_t {}; +struct hb_coretext_aat_font_data_t {}; -hb_coretext_aat_shaper_font_data_t * +hb_coretext_aat_font_data_t * _hb_coretext_aat_shaper_font_data_create (hb_font_t *font) { - return hb_coretext_shaper_font_data_ensure (font) ? (hb_coretext_aat_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED : nullptr; + return hb_coretext_shaper_font_data_ensure (font) ? (hb_coretext_aat_font_data_t *) HB_SHAPER_DATA_SUCCEEDED : nullptr; } void -_hb_coretext_aat_shaper_font_data_destroy (hb_coretext_aat_shaper_font_data_t *data HB_UNUSED) +_hb_coretext_aat_shaper_font_data_destroy (hb_coretext_aat_font_data_t *data HB_UNUSED) { } @@ -1378,20 +1378,20 @@ _hb_coretext_aat_shaper_font_data_destroy (hb_coretext_aat_shaper_font_data_t *d * shaper shape_plan data */ -struct hb_coretext_aat_shaper_shape_plan_data_t {}; +struct hb_coretext_aat_shape_plan_data_t {}; -hb_coretext_aat_shaper_shape_plan_data_t * +hb_coretext_aat_shape_plan_data_t * _hb_coretext_aat_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, const hb_feature_t *user_features HB_UNUSED, unsigned int num_user_features HB_UNUSED, const int *coords HB_UNUSED, unsigned int num_coords HB_UNUSED) { - return (hb_coretext_aat_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_coretext_aat_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_coretext_aat_shaper_shape_plan_data_destroy (hb_coretext_aat_shaper_shape_plan_data_t *data HB_UNUSED) +_hb_coretext_aat_shaper_shape_plan_data_destroy (hb_coretext_aat_shape_plan_data_t *data HB_UNUSED) { } diff --git a/src/hb-directwrite.cc b/src/hb-directwrite.cc index 7c688494f..baad81884 100644 --- a/src/hb-directwrite.cc +++ b/src/hb-directwrite.cc @@ -133,7 +133,7 @@ public: * shaper face data */ -struct hb_directwrite_shaper_face_data_t +struct hb_directwrite_face_data_t { IDWriteFactory *dwriteFactory; IDWriteFontFile *fontFile; @@ -143,10 +143,10 @@ struct hb_directwrite_shaper_face_data_t hb_blob_t *faceBlob; }; -hb_directwrite_shaper_face_data_t * +hb_directwrite_face_data_t * _hb_directwrite_shaper_face_data_create (hb_face_t *face) { - hb_directwrite_shaper_face_data_t *data = new hb_directwrite_shaper_face_data_t; + hb_directwrite_face_data_t *data = new hb_directwrite_face_data_t; if (unlikely (!data)) return nullptr; @@ -206,7 +206,7 @@ _hb_directwrite_shaper_face_data_create (hb_face_t *face) } void -_hb_directwrite_shaper_face_data_destroy (hb_directwrite_shaper_face_data_t *data) +_hb_directwrite_shaper_face_data_destroy (hb_directwrite_face_data_t *data) { if (data->fontFace) data->fontFace->Release (); @@ -233,16 +233,16 @@ _hb_directwrite_shaper_face_data_destroy (hb_directwrite_shaper_face_data_t *dat * shaper font data */ -struct hb_directwrite_shaper_font_data_t +struct hb_directwrite_font_data_t { }; -hb_directwrite_shaper_font_data_t * +hb_directwrite_font_data_t * _hb_directwrite_shaper_font_data_create (hb_font_t *font) { if (unlikely (!hb_directwrite_shaper_face_data_ensure (font->face))) return nullptr; - hb_directwrite_shaper_font_data_t *data = new hb_directwrite_shaper_font_data_t; + hb_directwrite_font_data_t *data = new hb_directwrite_font_data_t; if (unlikely (!data)) return nullptr; @@ -250,7 +250,7 @@ _hb_directwrite_shaper_font_data_create (hb_font_t *font) } void -_hb_directwrite_shaper_font_data_destroy (hb_directwrite_shaper_font_data_t *data) +_hb_directwrite_shaper_font_data_destroy (hb_directwrite_font_data_t *data) { delete data; } @@ -260,20 +260,20 @@ _hb_directwrite_shaper_font_data_destroy (hb_directwrite_shaper_font_data_t *dat * shaper shape_plan data */ -struct hb_directwrite_shaper_shape_plan_data_t {}; +struct hb_directwrite_shape_plan_data_t {}; -hb_directwrite_shaper_shape_plan_data_t * +hb_directwrite_shape_plan_data_t * _hb_directwrite_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, const hb_feature_t *user_features HB_UNUSED, unsigned int num_user_features HB_UNUSED, const int *coords HB_UNUSED, unsigned int num_coords HB_UNUSED) { - return (hb_directwrite_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_directwrite_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_directwrite_shaper_shape_plan_data_destroy (hb_directwrite_shaper_shape_plan_data_t *data HB_UNUSED) +_hb_directwrite_shaper_shape_plan_data_destroy (hb_directwrite_shape_plan_data_t *data HB_UNUSED) { } @@ -555,8 +555,8 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan, float lineWidth) { hb_face_t *face = font->face; - hb_directwrite_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); - hb_directwrite_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); + hb_directwrite_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + hb_directwrite_font_data_t *font_data = HB_SHAPER_DATA_GET (font); IDWriteFactory *dwriteFactory = face_data->dwriteFactory; IDWriteFontFace *fontFace = face_data->fontFace; diff --git a/src/hb-fallback-shape.cc b/src/hb-fallback-shape.cc index 3f09c3f53..eff20f70c 100644 --- a/src/hb-fallback-shape.cc +++ b/src/hb-fallback-shape.cc @@ -36,16 +36,16 @@ HB_SHAPER_DATA_ENSURE_DEFINE(fallback, font) * shaper face data */ -struct hb_fallback_shaper_face_data_t {}; +struct hb_fallback_face_data_t {}; -hb_fallback_shaper_face_data_t * +hb_fallback_face_data_t * _hb_fallback_shaper_face_data_create (hb_face_t *face HB_UNUSED) { - return (hb_fallback_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_fallback_face_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_fallback_shaper_face_data_destroy (hb_fallback_shaper_face_data_t *data HB_UNUSED) +_hb_fallback_shaper_face_data_destroy (hb_fallback_face_data_t *data HB_UNUSED) { } @@ -54,16 +54,16 @@ _hb_fallback_shaper_face_data_destroy (hb_fallback_shaper_face_data_t *data HB_U * shaper font data */ -struct hb_fallback_shaper_font_data_t {}; +struct hb_fallback_font_data_t {}; -hb_fallback_shaper_font_data_t * +hb_fallback_font_data_t * _hb_fallback_shaper_font_data_create (hb_font_t *font HB_UNUSED) { - return (hb_fallback_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_fallback_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_fallback_shaper_font_data_destroy (hb_fallback_shaper_font_data_t *data HB_UNUSED) +_hb_fallback_shaper_font_data_destroy (hb_fallback_font_data_t *data HB_UNUSED) { } @@ -72,20 +72,20 @@ _hb_fallback_shaper_font_data_destroy (hb_fallback_shaper_font_data_t *data HB_U * shaper shape_plan data */ -struct hb_fallback_shaper_shape_plan_data_t {}; +struct hb_fallback_shape_plan_data_t {}; -hb_fallback_shaper_shape_plan_data_t * +hb_fallback_shape_plan_data_t * _hb_fallback_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, const hb_feature_t *user_features HB_UNUSED, unsigned int num_user_features HB_UNUSED, const int *coords HB_UNUSED, unsigned int num_coords HB_UNUSED) { - return (hb_fallback_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_fallback_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_fallback_shaper_shape_plan_data_destroy (hb_fallback_shaper_shape_plan_data_t *data HB_UNUSED) +_hb_fallback_shaper_shape_plan_data_destroy (hb_fallback_shape_plan_data_t *data HB_UNUSED) { } diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc index c20f6bef2..da7944b85 100644 --- a/src/hb-graphite2.cc +++ b/src/hb-graphite2.cc @@ -48,7 +48,7 @@ typedef struct hb_graphite2_tablelist_t { unsigned int tag; } hb_graphite2_tablelist_t; -struct hb_graphite2_shaper_face_data_t { +struct hb_graphite2_face_data_t { hb_face_t *face; gr_face *grface; hb_graphite2_tablelist_t *tlist; @@ -56,7 +56,7 @@ struct hb_graphite2_shaper_face_data_t { static const void *hb_graphite2_get_table (const void *data, unsigned int tag, size_t *len) { - hb_graphite2_shaper_face_data_t *face_data = (hb_graphite2_shaper_face_data_t *) data; + hb_graphite2_face_data_t *face_data = (hb_graphite2_face_data_t *) data; hb_graphite2_tablelist_t *tlist = face_data->tlist; hb_blob_t *blob = nullptr; @@ -93,7 +93,7 @@ retry: return d; } -hb_graphite2_shaper_face_data_t * +hb_graphite2_face_data_t * _hb_graphite2_shaper_face_data_create (hb_face_t *face) { hb_blob_t *silf_blob = face->reference_table (HB_GRAPHITE2_TAG_SILF); @@ -106,7 +106,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face) } hb_blob_destroy (silf_blob); - hb_graphite2_shaper_face_data_t *data = (hb_graphite2_shaper_face_data_t *) calloc (1, sizeof (hb_graphite2_shaper_face_data_t)); + hb_graphite2_face_data_t *data = (hb_graphite2_face_data_t *) calloc (1, sizeof (hb_graphite2_shaper_face_data_t)); if (unlikely (!data)) return nullptr; @@ -122,7 +122,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face) } void -_hb_graphite2_shaper_face_data_destroy (hb_graphite2_shaper_face_data_t *data) +_hb_graphite2_shaper_face_data_destroy (hb_graphite2_face_data_t *data) { hb_graphite2_tablelist_t *tlist = data->tlist; @@ -154,16 +154,16 @@ hb_graphite2_face_get_gr_face (hb_face_t *face) * shaper font data */ -struct hb_graphite2_shaper_font_data_t {}; +struct hb_graphite2_font_data_t {}; -hb_graphite2_shaper_font_data_t * +hb_graphite2_font_data_t * _hb_graphite2_shaper_font_data_create (hb_font_t *font HB_UNUSED) { - return (hb_graphite2_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_graphite2_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_graphite2_shaper_font_data_destroy (hb_graphite2_shaper_font_data_t *data HB_UNUSED) +_hb_graphite2_shaper_font_data_destroy (hb_graphite2_font_data_t *data HB_UNUSED) { } @@ -181,20 +181,20 @@ hb_graphite2_font_get_gr_font (hb_font_t *font) * shaper shape_plan data */ -struct hb_graphite2_shaper_shape_plan_data_t {}; +struct hb_graphite2_shape_plan_data_t {}; -hb_graphite2_shaper_shape_plan_data_t * +hb_graphite2_shape_plan_data_t * _hb_graphite2_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, const hb_feature_t *user_features HB_UNUSED, unsigned int num_user_features HB_UNUSED, const int *coords HB_UNUSED, unsigned int num_coords HB_UNUSED) { - return (hb_graphite2_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_graphite2_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_graphite2_shaper_shape_plan_data_destroy (hb_graphite2_shaper_shape_plan_data_t *data HB_UNUSED) +_hb_graphite2_shaper_shape_plan_data_destroy (hb_graphite2_shape_plan_data_t *data HB_UNUSED) { } diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index e40a0e94a..d7f4afeab 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -27,8 +27,8 @@ */ #define HB_SHAPER ot -#define hb_ot_shaper_face_data_t hb_ot_layout_t -#define hb_ot_shaper_shape_plan_data_t hb_ot_shape_plan_t +#define hb_ot_face_data_t hb_ot_layout_t +#define hb_ot_shape_plan_data_t hb_ot_shape_plan_t #include "hb-shaper-impl-private.hh" #include "hb-ot-shape-private.hh" @@ -132,14 +132,14 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner, HB_SHAPER_DATA_ENSURE_DEFINE(ot, face) -hb_ot_shaper_face_data_t * +hb_ot_face_data_t * _hb_ot_shaper_face_data_create (hb_face_t *face) { return _hb_ot_layout_create (face); } void -_hb_ot_shaper_face_data_destroy (hb_ot_shaper_face_data_t *data) +_hb_ot_shaper_face_data_destroy (hb_ot_face_data_t *data) { _hb_ot_layout_destroy (data); } @@ -151,16 +151,16 @@ _hb_ot_shaper_face_data_destroy (hb_ot_shaper_face_data_t *data) HB_SHAPER_DATA_ENSURE_DEFINE(ot, font) -struct hb_ot_shaper_font_data_t {}; +struct hb_ot_font_data_t {}; -hb_ot_shaper_font_data_t * +hb_ot_font_data_t * _hb_ot_shaper_font_data_create (hb_font_t *font HB_UNUSED) { - return (hb_ot_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_ot_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_ot_shaper_font_data_destroy (hb_ot_shaper_font_data_t *data) +_hb_ot_shaper_font_data_destroy (hb_ot_font_data_t *data) { } @@ -169,7 +169,7 @@ _hb_ot_shaper_font_data_destroy (hb_ot_shaper_font_data_t *data) * shaper shape_plan data */ -hb_ot_shaper_shape_plan_data_t * +hb_ot_shape_plan_data_t * _hb_ot_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan, const hb_feature_t *user_features, unsigned int num_user_features, @@ -204,7 +204,7 @@ _hb_ot_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan, } void -_hb_ot_shaper_shape_plan_data_destroy (hb_ot_shaper_shape_plan_data_t *plan) +_hb_ot_shaper_shape_plan_data_destroy (hb_ot_shape_plan_data_t *plan) { if (plan->shaper->data_destroy) plan->shaper->data_destroy (const_cast (plan->data)); diff --git a/src/hb-shaper-private.hh b/src/hb-shaper-private.hh index a7ca36c61..457cd957b 100644 --- a/src/hb-shaper-private.hh +++ b/src/hb-shaper-private.hh @@ -54,7 +54,7 @@ _hb_shapers_get (void); /* Means: tried but failed to create. */ #define HB_SHAPER_DATA_INVALID ((void *) -1) -#define HB_SHAPER_DATA_TYPE_NAME(shaper, object) hb_##shaper##_shaper_##object##_data_t +#define HB_SHAPER_DATA_TYPE_NAME(shaper, object) hb_##shaper##_##object##_data_t #define HB_SHAPER_DATA_TYPE(shaper, object) struct HB_SHAPER_DATA_TYPE_NAME(shaper, object) #define HB_SHAPER_DATA_INSTANCE(shaper, object, instance) (* (HB_SHAPER_DATA_TYPE(shaper, object) **) &(instance)->shaper_data.shaper) #define HB_SHAPER_DATA(shaper, object) HB_SHAPER_DATA_INSTANCE(shaper, object, object) diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index 0199e65f8..c835c75da 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -309,7 +309,7 @@ HB_SHAPER_DATA_ENSURE_DEFINE(uniscribe, font) * shaper face data */ -struct hb_uniscribe_shaper_face_data_t { +struct hb_uniscribe_face_data_t { HANDLE fh; hb_uniscribe_shaper_funcs_t *funcs; wchar_t face_name[LF_FACESIZE]; @@ -439,10 +439,10 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name) HB_MEMORY_MODE_WRITABLE, nullptr, free); } -hb_uniscribe_shaper_face_data_t * +hb_uniscribe_face_data_t * _hb_uniscribe_shaper_face_data_create (hb_face_t *face) { - hb_uniscribe_shaper_face_data_t *data = (hb_uniscribe_shaper_face_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_face_data_t)); + hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_face_data_t)); if (unlikely (!data)) return nullptr; @@ -479,7 +479,7 @@ _hb_uniscribe_shaper_face_data_create (hb_face_t *face) } void -_hb_uniscribe_shaper_face_data_destroy (hb_uniscribe_shaper_face_data_t *data) +_hb_uniscribe_shaper_face_data_destroy (hb_uniscribe_face_data_t *data) { RemoveFontMemResourceEx (data->fh); free (data); @@ -490,7 +490,7 @@ _hb_uniscribe_shaper_face_data_destroy (hb_uniscribe_shaper_face_data_t *data) * shaper font data */ -struct hb_uniscribe_shaper_font_data_t { +struct hb_uniscribe_font_data_t { HDC hdc; LOGFONTW log_font; HFONT hfont; @@ -508,19 +508,19 @@ populate_log_font (LOGFONTW *lf, lf->lfCharSet = DEFAULT_CHARSET; hb_face_t *face = font->face; - hb_uniscribe_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + hb_uniscribe_face_data_t *face_data = HB_SHAPER_DATA_GET (face); memcpy (lf->lfFaceName, face_data->face_name, sizeof (lf->lfFaceName)); return true; } -hb_uniscribe_shaper_font_data_t * +hb_uniscribe_font_data_t * _hb_uniscribe_shaper_font_data_create (hb_font_t *font) { if (unlikely (!hb_uniscribe_shaper_face_data_ensure (font->face))) return nullptr; - hb_uniscribe_shaper_font_data_t *data = (hb_uniscribe_shaper_font_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_font_data_t)); + hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_font_data_t)); if (unlikely (!data)) return nullptr; @@ -559,7 +559,7 @@ _hb_uniscribe_shaper_font_data_create (hb_font_t *font) } void -_hb_uniscribe_shaper_font_data_destroy (hb_uniscribe_shaper_font_data_t *data) +_hb_uniscribe_shaper_font_data_destroy (hb_uniscribe_font_data_t *data) { if (data->hdc) ReleaseDC (nullptr, data->hdc); @@ -574,7 +574,7 @@ LOGFONTW * hb_uniscribe_font_get_logfontw (hb_font_t *font) { if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return nullptr; - hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); + hb_uniscribe_font_data_t *font_data = HB_SHAPER_DATA_GET (font); return &font_data->log_font; } @@ -582,7 +582,7 @@ HFONT hb_uniscribe_font_get_hfont (hb_font_t *font) { if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return nullptr; - hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); + hb_uniscribe_font_data_t *font_data = HB_SHAPER_DATA_GET (font); return font_data->hfont; } @@ -591,20 +591,20 @@ hb_uniscribe_font_get_hfont (hb_font_t *font) * shaper shape_plan data */ -struct hb_uniscribe_shaper_shape_plan_data_t {}; +struct hb_uniscribe_shape_plan_data_t {}; -hb_uniscribe_shaper_shape_plan_data_t * +hb_uniscribe_shape_plan_data_t * _hb_uniscribe_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, const hb_feature_t *user_features HB_UNUSED, unsigned int num_user_features HB_UNUSED, const int *coords HB_UNUSED, unsigned int num_coords HB_UNUSED) { - return (hb_uniscribe_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; + return (hb_uniscribe_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; } void -_hb_uniscribe_shaper_shape_plan_data_destroy (hb_uniscribe_shaper_shape_plan_data_t *data HB_UNUSED) +_hb_uniscribe_shaper_shape_plan_data_destroy (hb_uniscribe_shape_plan_data_t *data HB_UNUSED) { } @@ -622,8 +622,8 @@ _hb_uniscribe_shape (hb_shape_plan_t *shape_plan, unsigned int num_features) { hb_face_t *face = font->face; - hb_uniscribe_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); - hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); + hb_uniscribe_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + hb_uniscribe_font_data_t *font_data = HB_SHAPER_DATA_GET (font); hb_uniscribe_shaper_funcs_t *funcs = face_data->funcs; /* From 16ccfafbbd48c7a9737ce1d12e75406a050b71a9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 22:50:06 -0700 Subject: [PATCH 40/50] [face] Sprinkle const in the API --- src/hb-face.cc | 17 +++++++++-------- src/hb-face.h | 16 ++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/hb-face.cc b/src/hb-face.cc index fab2aa3a9..22b36a911 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -51,6 +51,7 @@ hb_face_count (hb_blob_t *blob) return 0; /* TODO We shouldn't be sanitizing blob. Port to run sanitizer and return if not sane. */ + /* Make API signature const after. */ hb_blob_t *sanitized = OT::hb_sanitize_context_t().sanitize_blob (hb_blob_reference (blob)); const OT::OpenTypeFontFile& ot = *sanitized->as (); unsigned int ret = ot.get_face_count (); @@ -302,7 +303,7 @@ hb_face_set_user_data (hb_face_t *face, * Since: 0.9.2 **/ void * -hb_face_get_user_data (hb_face_t *face, +hb_face_get_user_data (const hb_face_t *face, hb_user_data_key_t *key) { return hb_object_get_user_data (face, key); @@ -336,7 +337,7 @@ hb_face_make_immutable (hb_face_t *face) * Since: 0.9.2 **/ hb_bool_t -hb_face_is_immutable (hb_face_t *face) +hb_face_is_immutable (const hb_face_t *face) { return face->immutable; } @@ -354,8 +355,8 @@ hb_face_is_immutable (hb_face_t *face) * Since: 0.9.2 **/ hb_blob_t * -hb_face_reference_table (hb_face_t *face, - hb_tag_t tag) +hb_face_reference_table (const hb_face_t *face, + hb_tag_t tag) { return face->reference_table (tag); } @@ -406,7 +407,7 @@ hb_face_set_index (hb_face_t *face, * Since: 0.9.2 **/ unsigned int -hb_face_get_index (hb_face_t *face) +hb_face_get_index (const hb_face_t *face) { return face->index; } @@ -441,7 +442,7 @@ hb_face_set_upem (hb_face_t *face, * Since: 0.9.2 **/ unsigned int -hb_face_get_upem (hb_face_t *face) +hb_face_get_upem (const hb_face_t *face) { return face->get_upem (); } @@ -476,7 +477,7 @@ hb_face_set_glyph_count (hb_face_t *face, * Since: 0.9.7 **/ unsigned int -hb_face_get_glyph_count (hb_face_t *face) +hb_face_get_glyph_count (const hb_face_t *face) { return face->get_num_glyphs (); } @@ -492,7 +493,7 @@ hb_face_get_glyph_count (hb_face_t *face) * Since: 1.6.0 **/ unsigned int -hb_face_get_table_tags (hb_face_t *face, +hb_face_get_table_tags (const hb_face_t *face, unsigned int start_offset, unsigned int *table_count, /* IN/OUT */ hb_tag_t *table_tags /* OUT */) diff --git a/src/hb-face.h b/src/hb-face.h index 983ee56b1..208092efc 100644 --- a/src/hb-face.h +++ b/src/hb-face.h @@ -76,19 +76,19 @@ hb_face_set_user_data (hb_face_t *face, hb_bool_t replace); HB_EXTERN void * -hb_face_get_user_data (hb_face_t *face, +hb_face_get_user_data (const hb_face_t *face, hb_user_data_key_t *key); HB_EXTERN void hb_face_make_immutable (hb_face_t *face); HB_EXTERN hb_bool_t -hb_face_is_immutable (hb_face_t *face); +hb_face_is_immutable (const hb_face_t *face); HB_EXTERN hb_blob_t * -hb_face_reference_table (hb_face_t *face, - hb_tag_t tag); +hb_face_reference_table (const hb_face_t *face, + hb_tag_t tag); HB_EXTERN hb_blob_t * hb_face_reference_blob (hb_face_t *face); @@ -98,24 +98,24 @@ hb_face_set_index (hb_face_t *face, unsigned int index); HB_EXTERN unsigned int -hb_face_get_index (hb_face_t *face); +hb_face_get_index (const hb_face_t *face); HB_EXTERN void hb_face_set_upem (hb_face_t *face, unsigned int upem); HB_EXTERN unsigned int -hb_face_get_upem (hb_face_t *face); +hb_face_get_upem (const hb_face_t *face); HB_EXTERN void hb_face_set_glyph_count (hb_face_t *face, unsigned int glyph_count); HB_EXTERN unsigned int -hb_face_get_glyph_count (hb_face_t *face); +hb_face_get_glyph_count (const hb_face_t *face); HB_EXTERN unsigned int -hb_face_get_table_tags (hb_face_t *face, +hb_face_get_table_tags (const hb_face_t *face, unsigned int start_offset, unsigned int *table_count, /* IN/OUT */ hb_tag_t *table_tags /* OUT */); From cb1491f92e24649433988ff81a89347dccf07c8b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 22:50:45 -0700 Subject: [PATCH 41/50] Minor --- src/hb-blob-private.hh | 5 ----- src/hb-machinery-private.hh | 10 ++++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/hb-blob-private.hh b/src/hb-blob-private.hh index 56a7b668b..93fbc2d51 100644 --- a/src/hb-blob-private.hh +++ b/src/hb-blob-private.hh @@ -57,11 +57,6 @@ struct hb_blob_t HB_INTERNAL bool try_make_writable_inplace (void); HB_INTERNAL bool try_make_writable_inplace_unix (void); - inline void lock (void) - { - hb_blob_make_immutable (this); - } - template inline const Type* as (void) const { diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index ff56b1dc9..6617264b7 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -30,6 +30,8 @@ #define HB_MACHINERY_PRIVATE_HH #include "hb-private.hh" +#include "hb-blob-private.hh" + #include "hb-iter-private.hh" @@ -188,7 +190,7 @@ struct hb_sanitize_context_t : inline void start_processing (void) { - this->start = hb_blob_get_data (this->blob, nullptr); + this->start = this->blob->data; this->end = this->start + this->blob->length; assert (this->start <= this->end); /* Must not overflow. */ this->max_ops = MAX ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR, @@ -336,7 +338,7 @@ struct hb_sanitize_context_t : DEBUG_MSG_FUNC (SANITIZE, start, sane ? "PASSED" : "FAILED"); if (sane) { - blob->lock (); + hb_blob_make_immutable (blob); return blob; } else @@ -350,8 +352,8 @@ struct hb_sanitize_context_t : inline hb_blob_t *reference_table (const hb_face_t *face, hb_tag_t tableTag = Type::tableTag) { if (!num_glyphs_set) - set_num_glyphs (face->get_num_glyphs ()); - return sanitize_blob (face->reference_table (tableTag)); + set_num_glyphs (hb_face_get_glyph_count (face)); + return sanitize_blob (hb_face_reference_table (face, tableTag)); } mutable unsigned int debug_depth; From ed7b2e58fc9afb547656cf28eb4a253d989de43c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Aug 2018 23:59:09 -0700 Subject: [PATCH 42/50] Remove OT namespace from hb-machinery-private.hh --- src/dump-emoji.cc | 4 ++-- src/hb-aat-layout.cc | 2 +- src/hb-face.cc | 4 ++-- src/hb-machinery-private.hh | 14 +++++--------- src/hb-ot-font.cc | 8 ++++---- src/hb-ot-layout-private.hh | 10 +++++----- src/hb-ot-layout.cc | 8 ++++---- src/hb-ot-shape-complex-arabic-fallback.hh | 18 +++++++++--------- src/hb-static.cc | 4 ++-- src/hb-subset-glyf.cc | 2 +- src/hb-subset.cc | 8 ++++---- src/hb-uniscribe.cc | 2 +- 12 files changed, 40 insertions(+), 44 deletions(-) diff --git a/src/dump-emoji.cc b/src/dump-emoji.cc index 400b890ad..65214692f 100644 --- a/src/dump-emoji.cc +++ b/src/dump-emoji.cc @@ -233,10 +233,10 @@ int main (int argc, char **argv) svg.dump (svg_callback); svg.fini (); - hb_blob_t* colr_blob = OT::hb_sanitize_context_t().reference_table (face); + hb_blob_t* colr_blob = hb_sanitize_context_t ().reference_table (face); const OT::COLR *colr = colr_blob->as (); - hb_blob_t* cpal_blob = OT::hb_sanitize_context_t().reference_table (face); + hb_blob_t* cpal_blob = hb_sanitize_context_t ().reference_table (face); const OT::CPAL *cpal = cpal_blob->as (); cairo_font_face_t *cairo_face; diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 405aafccb..3417033fa 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -61,7 +61,7 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr) // static inline void // _hb_aat_layout_create (hb_face_t *face) // { -// hb_blob_t *morx_blob = OT::hb_sanitize_context_t().reference_table (face); +// hb_blob_t *morx_blob = hb_sanitize_context_t ().reference_table (face); // morx_blob->as (); // if (0) diff --git a/src/hb-face.cc b/src/hb-face.cc index 22b36a911..75dc486ea 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -52,7 +52,7 @@ hb_face_count (hb_blob_t *blob) /* TODO We shouldn't be sanitizing blob. Port to run sanitizer and return if not sane. */ /* Make API signature const after. */ - hb_blob_t *sanitized = OT::hb_sanitize_context_t().sanitize_blob (hb_blob_reference (blob)); + hb_blob_t *sanitized = hb_sanitize_context_t ().sanitize_blob (hb_blob_reference (blob)); const OT::OpenTypeFontFile& ot = *sanitized->as (); unsigned int ret = ot.get_face_count (); hb_blob_destroy (sanitized); @@ -190,7 +190,7 @@ hb_face_create (hb_blob_t *blob, if (unlikely (!blob)) blob = hb_blob_get_empty (); - hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (OT::hb_sanitize_context_t().sanitize_blob (hb_blob_reference (blob)), index); + hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (hb_sanitize_context_t ().sanitize_blob (hb_blob_reference (blob)), index); if (unlikely (!closure)) return hb_face_get_empty (); diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index 6617264b7..6328fb007 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -35,9 +35,6 @@ #include "hb-iter-private.hh" -namespace OT { - - /* * Casts */ @@ -593,7 +590,8 @@ struct BEInt * Lazy struct and blob loaders. */ -/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t */ +/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t. + * I mean, yeah, only every method is different. */ template struct hb_lazy_loader_t { @@ -643,7 +641,8 @@ struct hb_lazy_loader_t mutable T *instance; }; -/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t */ +/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t. + * I mean, yeah, only every method is different. */ template struct hb_table_lazy_loader_t { @@ -664,7 +663,7 @@ struct hb_table_lazy_loader_t hb_blob_t *b = (hb_blob_t *) hb_atomic_ptr_get (&blob); if (unlikely (!b)) { - b = OT::hb_sanitize_context_t().reference_table (face); + b = hb_sanitize_context_t ().reference_table (face); if (!hb_atomic_ptr_cmpexch (&blob, nullptr, b)) { hb_blob_destroy (b); @@ -692,7 +691,4 @@ struct hb_table_lazy_loader_t }; -} /* namespace OT */ - - #endif /* HB_MACHINERY_PRIVATE_HH */ diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 831023032..5085aa823 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -44,10 +44,10 @@ struct hb_ot_font_t OT::cmap::accelerator_t cmap; OT::hmtx::accelerator_t h_metrics; OT::vmtx::accelerator_t v_metrics; - OT::hb_lazy_loader_t glyf; - OT::hb_lazy_loader_t cbdt; - OT::hb_lazy_loader_t post; - OT::hb_lazy_loader_t kern; + hb_lazy_loader_t glyf; + hb_lazy_loader_t cbdt; + hb_lazy_loader_t post; + hb_lazy_loader_t kern; }; diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index 6fe673e91..a3cf137de 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -172,11 +172,11 @@ struct hb_ot_layout_t const struct OT::GPOS *gpos; /* TODO Move the following out of this struct. */ - OT::hb_table_lazy_loader_t base; - OT::hb_table_lazy_loader_t math; - OT::hb_table_lazy_loader_t fvar; - OT::hb_table_lazy_loader_t avar; - OT::hb_table_lazy_loader_t morx; + hb_table_lazy_loader_t base; + hb_table_lazy_loader_t math; + hb_table_lazy_loader_t fvar; + hb_table_lazy_loader_t avar; + hb_table_lazy_loader_t morx; unsigned int gsub_lookup_count; unsigned int gpos_lookup_count; diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index c790c3ceb..4cf469c3d 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -54,13 +54,13 @@ _hb_ot_layout_create (hb_face_t *face) if (unlikely (!layout)) return nullptr; - layout->gdef_blob = OT::hb_sanitize_context_t().reference_table (face); + layout->gdef_blob = hb_sanitize_context_t ().reference_table (face); layout->gdef = layout->gdef_blob->as (); - layout->gsub_blob = OT::hb_sanitize_context_t().reference_table (face); + layout->gsub_blob = hb_sanitize_context_t ().reference_table (face); layout->gsub = layout->gsub_blob->as (); - layout->gpos_blob = OT::hb_sanitize_context_t().reference_table (face); + layout->gpos_blob = hb_sanitize_context_t ().reference_table (face); layout->gpos = layout->gpos_blob->as (); layout->math.init (face); @@ -1116,7 +1116,7 @@ struct GPOSProxy struct hb_get_subtables_context_t : - OT::hb_dispatch_context_t + hb_dispatch_context_t { template static inline bool apply_to (const void *obj, OT::hb_ot_apply_context_t *c) diff --git a/src/hb-ot-shape-complex-arabic-fallback.hh b/src/hb-ot-shape-complex-arabic-fallback.hh index 5a257f042..40c5015c9 100644 --- a/src/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/hb-ot-shape-complex-arabic-fallback.hh @@ -79,12 +79,12 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS * May not be good-enough for presidential candidate interviews, but good-enough for us... */ hb_stable_sort (&glyphs[0], num_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &substitutes[0]); - OT::Supplier glyphs_supplier (glyphs, num_glyphs); - OT::Supplier substitutes_supplier (substitutes, num_glyphs); + Supplier glyphs_supplier (glyphs, num_glyphs); + Supplier substitutes_supplier (substitutes, num_glyphs); /* Each glyph takes four bytes max, and there's some overhead. */ char buf[(SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1) * 4 + 128]; - OT::hb_serialize_context_t c (buf, sizeof (buf)); + hb_serialize_context_t c (buf, sizeof (buf)); OT::SubstLookup *lookup = c.start_serialize (); bool ret = lookup->serialize_single (&c, OT::LookupFlag::IgnoreMarks, @@ -155,15 +155,15 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN if (!num_ligatures) return nullptr; - OT::Supplier first_glyphs_supplier (first_glyphs, num_first_glyphs); - OT::Supplier ligature_per_first_glyph_count_supplier (ligature_per_first_glyph_count_list, num_first_glyphs); - OT::Supplier ligatures_supplier (ligature_list, num_ligatures); - OT::Supplier component_count_supplier (component_count_list, num_ligatures); - OT::Supplier component_supplier (component_list, num_ligatures); + Supplier first_glyphs_supplier (first_glyphs, num_first_glyphs); + Supplier ligature_per_first_glyph_count_supplier (ligature_per_first_glyph_count_list, num_first_glyphs); + Supplier ligatures_supplier (ligature_list, num_ligatures); + Supplier component_count_supplier (component_count_list, num_ligatures); + Supplier component_supplier (component_list, num_ligatures); /* 16 bytes per ligature ought to be enough... */ char buf[ARRAY_LENGTH_CONST (ligature_list) * 16 + 128]; - OT::hb_serialize_context_t c (buf, sizeof (buf)); + hb_serialize_context_t c (buf, sizeof (buf)); OT::SubstLookup *lookup = c.start_serialize (); bool ret = lookup->serialize_ligature (&c, OT::LookupFlag::IgnoreMarks, diff --git a/src/hb-static.cc b/src/hb-static.cc index e6920e7e0..bd0943f53 100644 --- a/src/hb-static.cc +++ b/src/hb-static.cc @@ -38,7 +38,7 @@ hb_vector_size_impl_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (hb_vector_ void hb_face_t::load_num_glyphs (void) const { - OT::hb_sanitize_context_t c = OT::hb_sanitize_context_t(); + hb_sanitize_context_t c = hb_sanitize_context_t (); c.set_num_glyphs (0); /* So we don't recurse ad infinitum. */ hb_blob_t *maxp_blob = c.reference_table (this); const OT::maxp *maxp_table = maxp_blob->as (); @@ -49,7 +49,7 @@ hb_face_t::load_num_glyphs (void) const void hb_face_t::load_upem (void) const { - hb_blob_t *head_blob = OT::hb_sanitize_context_t().reference_table (this); + hb_blob_t *head_blob = hb_sanitize_context_t ().reference_table (this); const OT::head *head_table = head_blob->as (); upem = head_table->get_upem (); hb_blob_destroy (head_blob); diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc index 2b97a010a..36af3beae 100644 --- a/src/hb-subset-glyf.cc +++ b/src/hb-subset-glyf.cc @@ -292,7 +292,7 @@ hb_subset_glyf_and_loca (hb_subset_plan_t *plan, hb_blob_t **glyf_prime, /* OUT */ hb_blob_t **loca_prime /* OUT */) { - hb_blob_t *glyf_blob = OT::hb_sanitize_context_t().reference_table (plan->source); + hb_blob_t *glyf_blob = hb_sanitize_context_t ().reference_table (plan->source); const char *glyf_data = hb_blob_get_data(glyf_blob, nullptr); OT::glyf::accelerator_t glyf; diff --git a/src/hb-subset.cc b/src/hb-subset.cc index 308c7eb21..9e8e2aff7 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -78,7 +78,7 @@ template static bool _subset (hb_subset_plan_t *plan) { - hb_blob_t *source_blob = OT::hb_sanitize_context_t().reference_table (plan->source); + hb_blob_t *source_blob = hb_sanitize_context_t ().reference_table (plan->source); const TableType *table = source_blob->as (); hb_tag_t tag = TableType::tableTag; @@ -157,14 +157,14 @@ _hb_subset_face_data_reference_blob (hb_subset_face_data_t *data) if (unlikely (!buf)) return nullptr; - OT::hb_serialize_context_t c (buf, face_length); + hb_serialize_context_t c (buf, face_length); OT::OpenTypeFontFile *f = c.start_serialize (); bool is_cff = data->tables.lsearch (HB_TAG ('C','F','F',' ')) || data->tables.lsearch (HB_TAG ('C','F','F','2')); hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag; - OT::Supplier tags_supplier (&data->tables[0].tag, table_count, sizeof (data->tables[0])); - OT::Supplier blobs_supplier (&data->tables[0].blob, table_count, sizeof (data->tables[0])); + Supplier tags_supplier (&data->tables[0].tag, table_count, sizeof (data->tables[0])); + Supplier blobs_supplier (&data->tables[0].blob, table_count, sizeof (data->tables[0])); bool ret = f->serialize_single (&c, sfnt_tag, tags_supplier, diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index c835c75da..7f7f10d0b 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -358,7 +358,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name) * full, PS. All of them point to the same name data with our unique name. */ - blob = OT::hb_sanitize_context_t().sanitize_blob (blob); + blob = hb_sanitize_context_t ().sanitize_blob (blob); unsigned int length, new_length, name_str_len; const char *orig_sfnt_data = hb_blob_get_data (blob, &length); From bdd3c11a19d87999eeaff2c82f21c6938d1d9342 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 00:38:46 -0700 Subject: [PATCH 43/50] Internal templatization of lazy-loaders --- src/hb-machinery-private.hh | 74 ++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index 6328fb007..dbabeaddc 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -590,38 +590,54 @@ struct BEInt * Lazy struct and blob loaders. */ -/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t. - * I mean, yeah, only every method is different. */ -template -struct hb_lazy_loader_t +template +struct hb_base_lazy_loader_t { + /* https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern */ + inline const Subclass* thiz (void) const { return static_cast (this); } + inline void init (hb_face_t *face_) { face = face_; instance = nullptr; } + inline const Returned * operator-> (void) const + { + return thiz ()->get (); + } + + protected: + hb_face_t *face; + mutable Stored *instance; +}; + +template +struct hb_lazy_loader_t : hb_base_lazy_loader_t, T> +{ inline void fini (void) { - if (instance && instance != &Null(T)) + if (this->instance && this->instance != &Null(T)) { - instance->fini(); - free (instance); + this->instance->fini(); + free (this->instance); } } inline const T* get (void) const { retry: - T *p = (T *) hb_atomic_ptr_get (&instance); + T *p = (T *) hb_atomic_ptr_get (&this->instance); if (unlikely (!p)) { p = (T *) calloc (1, sizeof (T)); if (unlikely (!p)) p = const_cast (&Null(T)); else - p->init (face); - if (unlikely (!hb_atomic_ptr_cmpexch (const_cast(&instance), nullptr, p))) + p->init (this->face); + if (unlikely (!hb_atomic_ptr_cmpexch (const_cast(&this->instance), nullptr, p))) { if (p != &Null(T)) p->fini (); @@ -630,46 +646,29 @@ struct hb_lazy_loader_t } return p; } - - inline const T* operator-> (void) const - { - return get (); - } - - private: - hb_face_t *face; - mutable T *instance; }; -/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t. - * I mean, yeah, only every method is different. */ template -struct hb_table_lazy_loader_t +struct hb_table_lazy_loader_t : hb_base_lazy_loader_t, T, hb_blob_t> { - inline void init (hb_face_t *face_) - { - face = face_; - blob = nullptr; - } - inline void fini (void) { - hb_blob_destroy (blob); + hb_blob_destroy (this->instance); } inline hb_blob_t* get_blob (void) const { retry: - hb_blob_t *b = (hb_blob_t *) hb_atomic_ptr_get (&blob); + hb_blob_t *b = (hb_blob_t *) hb_atomic_ptr_get (&this->instance); if (unlikely (!b)) { - b = hb_sanitize_context_t ().reference_table (face); - if (!hb_atomic_ptr_cmpexch (&blob, nullptr, b)) + b = hb_sanitize_context_t ().reference_table (this->face); + if (!hb_atomic_ptr_cmpexch (&this->instance, nullptr, b)) { hb_blob_destroy (b); goto retry; } - blob = b; + this->instance = b; } return b; } @@ -679,15 +678,6 @@ struct hb_table_lazy_loader_t hb_blob_t *b = get_blob (); return b->as (); } - - inline const T* operator-> (void) const - { - return get(); - } - - private: - hb_face_t *face; - mutable hb_blob_t *blob; }; From ff7826e90bce46985651015059872d1d8559b6ce Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 01:27:40 -0700 Subject: [PATCH 44/50] Reduce storage by sharing face amongst lazy_loaders --- src/hb-machinery-private.hh | 119 ++++++++++++++++++++---------------- src/hb-ot-font.cc | 19 +++--- src/hb-ot-layout-private.hh | 11 ++-- src/hb-ot-layout.cc | 9 +-- 4 files changed, 88 insertions(+), 70 deletions(-) diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index dbabeaddc..081cbbfd1 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -590,93 +590,106 @@ struct BEInt * Lazy struct and blob loaders. */ -template struct hb_base_lazy_loader_t { + static_assert (WheresFace > 0, ""); + /* https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern */ inline const Subclass* thiz (void) const { return static_cast (this); } + inline Subclass* thiz (void) { return static_cast (this); } - inline void init (hb_face_t *face_) + inline void init (void) { - face = face_; instance = nullptr; } + inline void fini (void) + { + if (instance) + thiz ()->destroy (instance); + } inline const Returned * operator-> (void) const { return thiz ()->get (); } - protected: - hb_face_t *face; - mutable Stored *instance; -}; - -template -struct hb_lazy_loader_t : hb_base_lazy_loader_t, T> -{ - inline void fini (void) - { - if (this->instance && this->instance != &Null(T)) - { - this->instance->fini(); - free (this->instance); - } - } - - inline const T* get (void) const + inline Stored * get_stored (void) const { retry: - T *p = (T *) hb_atomic_ptr_get (&this->instance); + Stored *p = (Stored *) hb_atomic_ptr_get (&this->instance); if (unlikely (!p)) { - p = (T *) calloc (1, sizeof (T)); - if (unlikely (!p)) - p = const_cast (&Null(T)); - else - p->init (this->face); - if (unlikely (!hb_atomic_ptr_cmpexch (const_cast(&this->instance), nullptr, p))) + hb_face_t *face = *(((hb_face_t **) this) - WheresFace); + p = thiz ()->create (face); + if (unlikely (!hb_atomic_ptr_cmpexch (const_cast(&this->instance), nullptr, p))) { - if (p != &Null(T)) - p->fini (); + thiz ()->destroy (p); goto retry; } } return p; } + + inline const Returned * get (void) const + { + return thiz ()->convert (get_stored ()); + } + + static inline const Returned* convert (const Stored *p) + { + return p; + } + + private: + /* Must only have one pointer. */ + mutable Stored *instance; }; -template -struct hb_table_lazy_loader_t : hb_base_lazy_loader_t, T, hb_blob_t> +template +struct hb_lazy_loader_t : hb_base_lazy_loader_t, T> { - inline void fini (void) + static inline T *create (hb_face_t *face) { - hb_blob_destroy (this->instance); + T *p = (T *) calloc (1, sizeof (T)); + if (unlikely (!p)) + p = const_cast (&Null(T)); + else + p->init (face); + return p; + } + static inline void destroy (T *p) + { + if (p != &Null(T)) + { + p->fini(); + free (p); + } + } +}; + +template +struct hb_table_lazy_loader_t : hb_base_lazy_loader_t, T, hb_blob_t> +{ + static inline hb_blob_t *create (hb_face_t *face) + { + return hb_sanitize_context_t ().reference_table (face); + } + static inline void destroy (hb_blob_t *p) + { + hb_blob_destroy (p); + } + static inline const T* convert (const hb_blob_t *blob) + { + return blob->as (); } inline hb_blob_t* get_blob (void) const { - retry: - hb_blob_t *b = (hb_blob_t *) hb_atomic_ptr_get (&this->instance); - if (unlikely (!b)) - { - b = hb_sanitize_context_t ().reference_table (this->face); - if (!hb_atomic_ptr_cmpexch (&this->instance, nullptr, b)) - { - hb_blob_destroy (b); - goto retry; - } - this->instance = b; - } - return b; - } - - inline const T* get (void) const - { - hb_blob_t *b = get_blob (); - return b->as (); + return this->get_stored (); } }; diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 5085aa823..d80d8c4c1 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -44,10 +44,12 @@ struct hb_ot_font_t OT::cmap::accelerator_t cmap; OT::hmtx::accelerator_t h_metrics; OT::vmtx::accelerator_t v_metrics; - hb_lazy_loader_t glyf; - hb_lazy_loader_t cbdt; - hb_lazy_loader_t post; - hb_lazy_loader_t kern; + + hb_face_t *face; /* MUST be before the lazy loaders. */ + hb_lazy_loader_t<1, OT::glyf::accelerator_t> glyf; + hb_lazy_loader_t<2, OT::CBDT::accelerator_t> cbdt; + hb_lazy_loader_t<3, OT::post::accelerator_t> post; + hb_lazy_loader_t<4, OT::kern::accelerator_t> kern; }; @@ -62,10 +64,11 @@ _hb_ot_font_create (hb_face_t *face) ot_font->cmap.init (face); ot_font->h_metrics.init (face); ot_font->v_metrics.init (face, ot_font->h_metrics.ascender - ot_font->h_metrics.descender); /* TODO Can we do this lazily? */ - ot_font->glyf.init (face); - ot_font->cbdt.init (face); - ot_font->post.init (face); - ot_font->kern.init (face); + ot_font->face = face; + ot_font->glyf.init (); + ot_font->cbdt.init (); + ot_font->post.init (); + ot_font->kern.init (); return ot_font; } diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index a3cf137de..3a99937c2 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -172,11 +172,12 @@ struct hb_ot_layout_t const struct OT::GPOS *gpos; /* TODO Move the following out of this struct. */ - hb_table_lazy_loader_t base; - hb_table_lazy_loader_t math; - hb_table_lazy_loader_t fvar; - hb_table_lazy_loader_t avar; - hb_table_lazy_loader_t morx; + hb_face_t *face; /* MUST be before the lazy loaders. */ + hb_table_lazy_loader_t<1, struct OT::BASE> base; + hb_table_lazy_loader_t<2, struct OT::MATH> math; + hb_table_lazy_loader_t<3, struct OT::fvar> fvar; + hb_table_lazy_loader_t<4, struct OT::avar> avar; + hb_table_lazy_loader_t<5, struct AAT::morx> morx; unsigned int gsub_lookup_count; unsigned int gpos_lookup_count; diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 4cf469c3d..8a9eae45f 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -63,10 +63,11 @@ _hb_ot_layout_create (hb_face_t *face) layout->gpos_blob = hb_sanitize_context_t ().reference_table (face); layout->gpos = layout->gpos_blob->as (); - layout->math.init (face); - layout->fvar.init (face); - layout->avar.init (face); - layout->morx.init (face); + layout->face = face; + layout->math.init (); + layout->fvar.init (); + layout->avar.init (); + layout->morx.init (); { /* From 6404c49d0735d92779089ddef5c1d34aad1542d7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 01:36:08 -0700 Subject: [PATCH 45/50] Minor --- src/hb-machinery-private.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index 081cbbfd1..140bff6c8 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -587,7 +587,7 @@ struct BEInt /* - * Lazy struct and blob loaders. + * Lazy loaders. */ template struct hb_lazy_loader_t : hb_base_lazy_loader_t, T> { From ee35af738b5c802ca62eb1c39b77f0bd992329df Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 01:37:57 -0700 Subject: [PATCH 46/50] Make lazy-loader safe for nil objectification --- src/hb-machinery-private.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index 140bff6c8..40e42071f 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -656,6 +656,8 @@ struct hb_lazy_loader_t : hb_base_lazy_loader_t (&Null(T)); T *p = (T *) calloc (1, sizeof (T)); if (unlikely (!p)) p = const_cast (&Null(T)); @@ -678,6 +680,8 @@ struct hb_table_lazy_loader_t : hb_base_lazy_loader_t (face); } static inline void destroy (hb_blob_t *p) From 443de26fa56dd1ef149d3ce4206f4495eceec2eb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 01:41:19 -0700 Subject: [PATCH 47/50] Minor --- src/hb-face.cc | 1 - src/hb-ot-layout-private.hh | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/hb-face.cc b/src/hb-face.cc index 75dc486ea..9d17c4a5f 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -33,7 +33,6 @@ #include "hb-open-file-private.hh" - /** * hb_face_count: Get number of faces on the blob * @blob: diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index 3a99937c2..fc2e57e7d 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -171,6 +171,12 @@ struct hb_ot_layout_t const struct OT::GSUB *gsub; const struct OT::GPOS *gpos; + unsigned int gsub_lookup_count; + unsigned int gpos_lookup_count; + + hb_ot_layout_lookup_accelerator_t *gsub_accels; + hb_ot_layout_lookup_accelerator_t *gpos_accels; + /* TODO Move the following out of this struct. */ hb_face_t *face; /* MUST be before the lazy loaders. */ hb_table_lazy_loader_t<1, struct OT::BASE> base; @@ -178,12 +184,6 @@ struct hb_ot_layout_t hb_table_lazy_loader_t<3, struct OT::fvar> fvar; hb_table_lazy_loader_t<4, struct OT::avar> avar; hb_table_lazy_loader_t<5, struct AAT::morx> morx; - - unsigned int gsub_lookup_count; - unsigned int gpos_lookup_count; - - hb_ot_layout_lookup_accelerator_t *gsub_accels; - hb_ot_layout_lookup_accelerator_t *gpos_accels; }; From 66952ec47b5f09d88b83fb6a71b1cdb26c53668d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 01:44:20 -0700 Subject: [PATCH 48/50] Remove unused table reference --- src/hb-ot-layout-private.hh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index fc2e57e7d..c88557239 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -179,11 +179,10 @@ struct hb_ot_layout_t /* TODO Move the following out of this struct. */ hb_face_t *face; /* MUST be before the lazy loaders. */ - hb_table_lazy_loader_t<1, struct OT::BASE> base; - hb_table_lazy_loader_t<2, struct OT::MATH> math; - hb_table_lazy_loader_t<3, struct OT::fvar> fvar; - hb_table_lazy_loader_t<4, struct OT::avar> avar; - hb_table_lazy_loader_t<5, struct AAT::morx> morx; + hb_table_lazy_loader_t<1, struct OT::MATH> math; + hb_table_lazy_loader_t<2, struct OT::fvar> fvar; + hb_table_lazy_loader_t<3, struct OT::avar> avar; + hb_table_lazy_loader_t<4, struct AAT::morx> morx; }; From 91126aa11a5fa2bff72137df4768ad13fc9b7803 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 02:03:13 -0700 Subject: [PATCH 49/50] [uniscribe] Update for recent changes --- src/hb-uniscribe.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index 7f7f10d0b..6d579534f 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -383,7 +383,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name) memcpy(new_sfnt_data, orig_sfnt_data, length); - OT::name &name = OT::StructAtOffset (new_sfnt_data, name_table_offset); + OT::name &name = StructAtOffset (new_sfnt_data, name_table_offset); name.format.set (0); name.count.set (ARRAY_LENGTH (name_IDs)); name.stringOffset.set (name.get_size ()); @@ -399,7 +399,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name) } /* Copy string data from new_name, converting wchar_t to UTF16BE. */ - unsigned char *p = &OT::StructAfter (name); + unsigned char *p = &StructAfter (name); for (unsigned int i = 0; i < name_str_len; i++) { *p++ = new_name[i] >> 8; From d4d1bf8177b127caa57b146c932f553dca1ad933 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Aug 2018 02:04:02 -0700 Subject: [PATCH 50/50] Fix for recent rename --- src/hb-graphite2.cc | 2 +- src/hb-uniscribe.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc index da7944b85..2ba905d6d 100644 --- a/src/hb-graphite2.cc +++ b/src/hb-graphite2.cc @@ -106,7 +106,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face) } hb_blob_destroy (silf_blob); - hb_graphite2_face_data_t *data = (hb_graphite2_face_data_t *) calloc (1, sizeof (hb_graphite2_shaper_face_data_t)); + hb_graphite2_face_data_t *data = (hb_graphite2_face_data_t *) calloc (1, sizeof (hb_graphite2_face_data_t)); if (unlikely (!data)) return nullptr; diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index 6d579534f..94e6bb551 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -442,7 +442,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name) hb_uniscribe_face_data_t * _hb_uniscribe_shaper_face_data_create (hb_face_t *face) { - hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_face_data_t)); + hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) calloc (1, sizeof (hb_uniscribe_face_data_t)); if (unlikely (!data)) return nullptr; @@ -520,7 +520,7 @@ _hb_uniscribe_shaper_font_data_create (hb_font_t *font) { if (unlikely (!hb_uniscribe_shaper_face_data_ensure (font->face))) return nullptr; - hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_font_data_t)); + hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) calloc (1, sizeof (hb_uniscribe_font_data_t)); if (unlikely (!data)) return nullptr;