From 68b76121f83fc9b87dc84f03e8bef38d4332734d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 8 Jun 2012 10:43:49 -0400 Subject: [PATCH] Fix regressions introduced by sed. Ouch! Introduced in 99c2695759a6af855d565f4994bbdf220570bb48. Broken mark-mark and mark-ligature stuff. --- src/hb-ot-layout-gpos-table.hh | 6 +++--- src/hb-ot-layout-gsubgpos-private.hh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 71c13a2e0..49986ea77 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1068,7 +1068,7 @@ struct MarkLigPosFormat1 * can directly use the component index. If not, we attach the mark * glyph to the last component of the ligature. */ if (get_lig_id (c->buffer->info[j]) && - get_lig_id (c->buffer->cur()) && + get_lig_id (c->buffer->info[j]) == get_lig_id (c->buffer->cur()) && get_lig_comp (c->buffer->cur()) > 0) { comp_index = get_lig_comp (c->buffer->cur()) - 1; @@ -1166,9 +1166,9 @@ struct MarkMarkPosFormat1 /* Two marks match only if they belong to the same base, or same component * of the same ligature. That is, the component numbers must match, and * if those are non-zero, the ligid number should also match. */ - if ((get_lig_comp (c->buffer->cur())) || + if ((get_lig_comp (c->buffer->info[j]) != get_lig_comp (c->buffer->cur())) || (get_lig_comp (c->buffer->info[j]) > 0 && - get_lig_id (c->buffer->cur()))) + get_lig_id (c->buffer->info[j]) != get_lig_id (c->buffer->cur()))) return TRACE_RETURN (false); unsigned int mark2_index = (this+mark2Coverage) (c->buffer->info[j].codepoint); diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index e590e3955..2554f42e1 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -95,7 +95,7 @@ struct hb_closure_context_t #endif #define TRACE_APPLY() \ - hb_auto_trace_t trace (&c->debug_depth, "APPLY", this, HB_FUNC, "idx %d codepoint %u", c->buffer->cur().codepoint); + hb_auto_trace_t trace (&c->debug_depth, "APPLY", this, HB_FUNC, "idx %d codepoint %u", c->buffer->idx, c->buffer->cur().codepoint);