From daf13afb0801740dcc7900c4af190e24b80a05c0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 Aug 2012 16:38:44 -0400 Subject: [PATCH] [OT] Implement fallback mark positioning for "double" combining marks --- src/hb-ot-shape-fallback.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc index a6e5b1630..56a3e7ae1 100644 --- a/src/hb-ot-shape-fallback.cc +++ b/src/hb-ot-shape-fallback.cc @@ -162,7 +162,14 @@ position_mark (const hb_ot_shape_plan_t *plan, { case HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW: case HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE: - /* TODO Do something... For now, fall through. */ + if (buffer->props.direction == HB_DIRECTION_LTR) { + pos.x_offset += base_extents.x_bearing - mark_extents.width / 2 - mark_extents.x_bearing; + break; + } else if (buffer->props.direction == HB_DIRECTION_RTL) { + pos.x_offset += base_extents.x_bearing + base_extents.width - mark_extents.width / 2 - mark_extents.x_bearing; + break; + } + /* Fall through */ case HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW: case HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE: