diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index a26cc4f09ec6bf88725e389ccbe3181812975884..d50c65366ef97efbf75d1a596e244a7312127a21 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -34,38 +34,6 @@ -/* unique ligature id */ -/* component number in the ligature (0 = base) */ -static inline void -set_lig_props (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_comp) -{ - info.lig_props() = (lig_id << 4) | (lig_comp & 0x0F); -} -static inline unsigned int -get_lig_id (const hb_glyph_info_t &info) -{ - return info.lig_props() >> 4; -} -static inline unsigned int -get_lig_comp (const hb_glyph_info_t &info) -{ - return info.lig_props() & 0x0F; -} -static inline bool -is_a_ligature (const hb_glyph_info_t &info) -{ - return unlikely (get_lig_id (info) && ~get_lig_comp (info)); -} - -static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) { - uint8_t lig_id = buffer->next_serial () & 0x0F; - if (unlikely (!lig_id)) - lig_id = allocate_lig_id (buffer); /* in case of overflow */ - return lig_id; -} - - - #ifndef HB_DEBUG_CLOSURE #define HB_DEBUG_CLOSURE (HB_DEBUG+0) #endif diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index 366b0616d8040f5e8bad3e22704a70be76710169..7a1c7e3f184497c10b598c46d08c6ba986c6b0a1 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -64,6 +64,41 @@ _hb_ot_layout_skip_mark (hb_face_t *face, unsigned int *property_out); +/* + * GSUB/GPOS + */ + +/* unique ligature id */ +/* component number in the ligature (0 = base) */ +static inline void +set_lig_props (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_comp) +{ + info.lig_props() = (lig_id << 4) | (lig_comp & 0x0F); +} +static inline unsigned int +get_lig_id (const hb_glyph_info_t &info) +{ + return info.lig_props() >> 4; +} +static inline unsigned int +get_lig_comp (const hb_glyph_info_t &info) +{ + return info.lig_props() & 0x0F; +} +static inline bool +is_a_ligature (const hb_glyph_info_t &info) +{ + return unlikely (get_lig_id (info) && ~get_lig_comp (info)); +} + +static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) { + uint8_t lig_id = buffer->next_serial () & 0x0F; + if (unlikely (!lig_id)) + lig_id = allocate_lig_id (buffer); /* in case of overflow */ + return lig_id; +} + + /* * hb_ot_layout_t diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 8b1d97577c753f44e804aec708456ca1e955136f..e7b70c8ed0ba2168a65e05071b1f57a87ce7010d 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -26,7 +26,7 @@ #include "hb-ot-shape-complex-indic-private.hh" #include "hb-ot-shape-private.hh" -#include "hb-ot-layout-gsubgpos-private.hh" +#include "hb-ot-layout-private.hh" #define OLD_INDIC_TAG(script) (((hb_tag_t) script) | 0x20000000) #define IS_OLD_INDIC_TAG(tag) ( \