From 04ff23e73d847ab3a5da0e9fac4fbca19aefd284 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 6 Nov 2015 16:29:44 -0800 Subject: [PATCH] [arabic] Improve stretch length calculation Err on the side of being too short, than too wide. Reduces chance of overlaps with neighboring glyphs. --- src/hb-ot-shape-complex-arabic.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index a3f528dcf..575ab6100 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -541,7 +541,7 @@ apply_stch (const hb_ot_shape_plan_t *plan, hb_position_t w_remaining = w_total - w_fixed - overlap; if (sign * w_remaining > sign * w_repeating && sign * w_repeating > 0) - n_copies = (sign * w_remaining + sign * w_repeating / 2) / (sign * w_repeating) - 1; + n_copies = (sign * w_remaining + sign * w_repeating / 4) / (sign * w_repeating) - 1; if (step == MEASURE) {