Reorder hb_ot_shaper_t members to save 8 bytes of data per shaper
This commit is contained in:
parent
e5f0bc8f0a
commit
c2712ff4f5
|
@ -735,12 +735,12 @@ const hb_ot_shaper_t _hb_ot_shaper_arabic =
|
|||
data_destroy_arabic,
|
||||
nullptr, /* preprocess_text */
|
||||
postprocess_glyphs_arabic,
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
nullptr, /* decompose */
|
||||
nullptr, /* compose */
|
||||
setup_masks_arabic,
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
reorder_marks_arabic,
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
|
||||
true, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -39,12 +39,12 @@ const hb_ot_shaper_t _hb_ot_shaper_default =
|
|||
nullptr, /* data_destroy */
|
||||
nullptr, /* preprocess_text */
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
nullptr, /* decompose */
|
||||
nullptr, /* compose */
|
||||
nullptr, /* setup_masks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
|
||||
true, /* fallback_position */
|
||||
};
|
||||
|
@ -59,12 +59,12 @@ const hb_ot_shaper_t _hb_ot_shaper_dumber =
|
|||
nullptr, /* data_destroy */
|
||||
nullptr, /* preprocess_text */
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
nullptr, /* decompose */
|
||||
nullptr, /* compose */
|
||||
nullptr, /* setup_masks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
||||
false, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -422,12 +422,12 @@ const hb_ot_shaper_t _hb_ot_shaper_hangul =
|
|||
data_destroy_hangul,
|
||||
preprocess_text_hangul,
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
|
||||
nullptr, /* decompose */
|
||||
nullptr, /* compose */
|
||||
setup_masks_hangul,
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
||||
false, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -171,12 +171,12 @@ const hb_ot_shaper_t _hb_ot_shaper_hebrew =
|
|||
nullptr, /* data_destroy */
|
||||
nullptr, /* preprocess_text */
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
nullptr, /* decompose */
|
||||
compose_hebrew,
|
||||
nullptr, /* setup_masks */
|
||||
HB_TAG ('h','e','b','r'), /* gpos_tag. https://github.com/harfbuzz/harfbuzz/issues/347#issuecomment-267838368 */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG ('h','e','b','r'), /* gpos_tag. https://github.com/harfbuzz/harfbuzz/issues/347#issuecomment-267838368 */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
|
||||
true, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -1528,12 +1528,12 @@ const hb_ot_shaper_t _hb_ot_shaper_indic =
|
|||
data_destroy_indic,
|
||||
preprocess_text_indic,
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
decompose_indic,
|
||||
compose_indic,
|
||||
setup_masks_indic,
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
||||
false, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -368,12 +368,12 @@ const hb_ot_shaper_t _hb_ot_shaper_khmer =
|
|||
data_destroy_khmer,
|
||||
nullptr, /* preprocess_text */
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
decompose_khmer,
|
||||
compose_khmer,
|
||||
setup_masks_khmer,
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
||||
false, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -320,12 +320,12 @@ const hb_ot_shaper_t _hb_ot_shaper_myanmar =
|
|||
nullptr, /* data_destroy */
|
||||
nullptr, /* preprocess_text */
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
nullptr, /* decompose */
|
||||
nullptr, /* compose */
|
||||
setup_masks_myanmar,
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY,
|
||||
false, /* fallback_position */
|
||||
};
|
||||
|
@ -342,12 +342,12 @@ const hb_ot_shaper_t _hb_ot_shaper_myanmar_zawgyi =
|
|||
nullptr, /* data_destroy */
|
||||
nullptr, /* preprocess_text */
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
|
||||
nullptr, /* decompose */
|
||||
nullptr, /* compose */
|
||||
nullptr, /* setup_masks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
||||
false, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -379,12 +379,12 @@ const hb_ot_shaper_t _hb_ot_shaper_thai =
|
|||
nullptr, /* data_destroy */
|
||||
preprocess_text_thai,
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
nullptr, /* decompose */
|
||||
nullptr, /* compose */
|
||||
nullptr, /* setup_masks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE,
|
||||
false,/* fallback_position */
|
||||
};
|
||||
|
|
|
@ -490,12 +490,12 @@ const hb_ot_shaper_t _hb_ot_shaper_use =
|
|||
data_destroy_use,
|
||||
preprocess_text_use,
|
||||
nullptr, /* postprocess_glyphs */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
nullptr, /* decompose */
|
||||
compose_use,
|
||||
setup_masks_use,
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
nullptr, /* reorder_marks */
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY,
|
||||
false, /* fallback_position */
|
||||
};
|
||||
|
|
|
@ -117,8 +117,6 @@ struct hb_ot_shaper_t
|
|||
hb_font_t *font);
|
||||
|
||||
|
||||
hb_ot_shape_normalization_mode_t normalization_preference;
|
||||
|
||||
/* decompose()
|
||||
* Called during shape()'s normalization.
|
||||
* May be NULL.
|
||||
|
@ -147,12 +145,6 @@ struct hb_ot_shaper_t
|
|||
hb_buffer_t *buffer,
|
||||
hb_font_t *font);
|
||||
|
||||
/* gpos_tag()
|
||||
* If not HB_TAG_NONE, then must match found GPOS script tag for
|
||||
* GPOS to be applied. Otherwise, fallback positioning will be used.
|
||||
*/
|
||||
hb_tag_t gpos_tag;
|
||||
|
||||
/* reorder_marks()
|
||||
* Called during shape().
|
||||
* Shapers can use to modify ordering of combining marks.
|
||||
|
@ -163,6 +155,14 @@ struct hb_ot_shaper_t
|
|||
unsigned int start,
|
||||
unsigned int end);
|
||||
|
||||
/* gpos_tag()
|
||||
* If not HB_TAG_NONE, then must match found GPOS script tag for
|
||||
* GPOS to be applied. Otherwise, fallback positioning will be used.
|
||||
*/
|
||||
hb_tag_t gpos_tag;
|
||||
|
||||
hb_ot_shape_normalization_mode_t normalization_preference;
|
||||
|
||||
hb_ot_shape_zero_width_marks_type_t zero_width_marks;
|
||||
|
||||
bool fallback_position;
|
||||
|
|
Loading…
Reference in New Issue