diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 550637580..203d5f868 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -786,6 +786,8 @@ hb_ot_metrics_tag_t
hb-ot-shape +HB_OT_SHAPE_BUFFER_FORMAT_SERIAL +hb_ot_shape_get_buffer_format_serial hb_ot_shape_glyphs_closure
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 7b3b854d5..a2161fa30 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -1328,4 +1328,20 @@ hb_ot_shape_glyphs_closure (hb_font_t *font, } +/** + * hb_ot_shape_get_buffer_format_serial: + * + * Returns the serial number of the current internal buffer format. + * See #HB_OT_SHAPE_BUFFER_FORMAT_SERIAL for more information. + * + * Return value: The current buffer-format serial number. + * + * XSince: REPLACEME + **/ +unsigned int +hb_ot_shape_get_buffer_format_serial (void) +{ + return HB_OT_SHAPE_BUFFER_FORMAT_SERIAL; +} + #endif diff --git a/src/hb-ot-shape.h b/src/hb-ot-shape.h index 80063f775..8935fb5c0 100644 --- a/src/hb-ot-shape.h +++ b/src/hb-ot-shape.h @@ -54,6 +54,21 @@ hb_ot_shape_plan_get_feature_tags (hb_shape_plan_t *shape_plan, unsigned int *tag_count, /* IN/OUT */ hb_tag_t *tags /* OUT */); +/** + * HB_OT_SHAPE_BUFFER_FORMAT_SERIAL: + * + * The serial number of the current internal buffer format. + * + * The serial number will increase when internal #hb_glyph_info_t and + * #hb_glyph_position_t members change their format. + * + * XSince: REPLACEME + */ +#define HB_OT_SHAPE_BUFFER_FORMAT_SERIAL 1 + +HB_EXTERN unsigned int +hb_ot_shape_get_buffer_format_serial (void); + HB_END_DECLS #endif /* HB_OT_SHAPE_H */