From 89e2834dabd2d17f2823c51fe3a7fcadeaba7a59 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 14 May 2010 20:25:55 -0400 Subject: [PATCH] Remove the IN_LIGID() macro --- src/hb-buffer-private.hh | 1 - src/hb-ot-layout-gpos-private.hh | 4 ++-- src/hb-ot-layout-gsub-private.hh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index 8a6da2e42..008c90e81 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -163,7 +163,6 @@ struct _hb_buffer_t { #define IN_CURINFO() (&BUFFER->in_string[BUFFER->in_pos]) #define IN_MASK(pos) (BUFFER->in_string[(pos)].mask) #define IN_CLUSTER(pos) (BUFFER->in_string[(pos)].cluster) -#define IN_LIGID(pos) (BUFFER->in_string[(pos)].lig_id) HB_END_DECLS diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh index 5fb3fd3a2..4e8ba5665 100644 --- a/src/hb-ot-layout-gpos-private.hh +++ b/src/hb-ot-layout-gpos-private.hh @@ -1203,7 +1203,7 @@ struct MarkLigPosFormat1 * is identical to the ligature ID of the found ligature. If yes, we * can directly use the component index. If not, we attach the mark * glyph to the last component of the ligature. */ - if (IN_LIGID (j) && IN_LIGID (j) == IN_LIGID (c->buffer->in_pos) && c->buffer->in_string[c->buffer->in_pos].component) + if (c->buffer->in_string[j].lig_id && c->buffer->in_string[j].lig_id == c->buffer->in_string[c->buffer->in_pos].lig_id && c->buffer->in_string[c->buffer->in_pos].component) { comp_index = c->buffer->in_string[c->buffer->in_pos].component - 1; if (comp_index >= comp_count) @@ -1309,7 +1309,7 @@ struct MarkMarkPosFormat1 * of the same ligature. That is, the component numbers must match, and * if those are non-zero, the ligid number should also match. */ if ((c->buffer->in_string[j].component != c->buffer->in_string[c->buffer->in_pos].component) || - (c->buffer->in_string[j].component && IN_LIGID (j) != IN_LIGID (c->buffer->in_pos))) + (c->buffer->in_string[j].component && c->buffer->in_string[j].lig_id != c->buffer->in_string[c->buffer->in_pos].lig_id)) return false; unsigned int mark2_index = (this+mark2Coverage) (IN_GLYPH (j)); diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh index 2c86ecd07..54c057d30 100644 --- a/src/hb-ot-layout-gsub-private.hh +++ b/src/hb-ot-layout-gsub-private.hh @@ -403,7 +403,7 @@ struct Ligature c->buffer->add_output_glyphs_be16 (i, 1, (const uint16_t *) &ligGlyph, 0, - IN_LIGID (c->buffer->in_pos) && !c->buffer->in_string[c->buffer->in_pos].component ? + c->buffer->in_string[c->buffer->in_pos].lig_id && !c->buffer->in_string[c->buffer->in_pos].component ? 0xFFFF : c->buffer->allocate_lig_id ()); else {