From 18c42850c9327ab4479ff150660a76d4ff6f3e9c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 25 Jul 2011 00:36:58 -0400 Subject: [PATCH] Shrink space used for ligature ids This frees 16bits in the glyph_info struct during the ot_layout process. We can use the freed space in the shapers now. --- src/hb-ot-layout-gsubgpos-private.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 8be431277..2d07a6f2a 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -36,11 +36,11 @@ HB_BEGIN_DECLS /* buffer var allocations */ -#define lig_id() var2.u16[0] /* unique ligature id */ -#define lig_comp() var2.u16[1] /* component number in the ligature (0 = base) */ +#define lig_id() var2.u8[2] /* unique ligature id */ +#define lig_comp() var2.u8[3] /* component number in the ligature (0 = base) */ -static inline uint16_t allocate_lig_id (hb_buffer_t *buffer) { - uint16_t lig_id = buffer->next_serial (); +static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) { + uint8_t lig_id = buffer->next_serial (); if (unlikely (!lig_id)) lig_id = buffer->next_serial (); /* in case of overflow */ return lig_id; }