Bunch of independent changes (ouch) API additions: hb_segment_properties_t HB_SEGMENT_PROPERTIES_DEFAULT hb_segment_properties_equal() hb_segment_properties_hash() hb_buffer_set_segment_properties() hb_buffer_get_segment_properties() hb_ot_layout_glyph_class_t hb_shape_plan_t hb_shape_plan_create() hb_shape_plan_create_cached() hb_shape_plan_get_empty() hb_shape_plan_reference() hb_shape_plan_destroy() hb_shape_plan_set_user_data() hb_shape_plan_get_user_data() hb_shape_plan_execute() hb_ot_shape_plan_collect_lookups() API changes: Rename hb_ot_layout_feature_get_lookup_indexes() to hb_ot_layout_feature_get_lookups(). New header file: hb-shape-plan.h And a bunch of prototyped but not implemented stuff. Coming soon. (Tests fail because of the prototypes right now.)
diff --git a/src/hb-buffer.h b/src/hb-buffer.h index cd574c3..255f005 100644 --- a/src/hb-buffer.h +++ b/src/hb-buffer.h
@@ -41,8 +41,6 @@ HB_BEGIN_DECLS -typedef struct hb_buffer_t hb_buffer_t; - typedef struct hb_glyph_info_t { hb_codepoint_t codepoint; hb_mask_t mask; @@ -64,6 +62,36 @@ } hb_glyph_position_t; +typedef struct hb_segment_properties_t { + hb_direction_t direction; + hb_script_t script; + hb_language_t language; + /*< private >*/ + void *reserved1; + void *reserved2; +} hb_segment_properties_t; + +#define HB_SEGMENT_PROPERTIES_DEFAULT {HB_DIRECTION_INVALID, \ + HB_SCRIPT_INVALID, \ + HB_LANGUAGE_INVALID, \ + NULL, \ + NULL} + +hb_bool_t +hb_segment_properties_equal (const hb_segment_properties_t *a, + const hb_segment_properties_t *b); + +unsigned int +hb_segment_properties_hash (const hb_segment_properties_t *p); + + + +/* + * hb_buffer_t + */ + +typedef struct hb_buffer_t hb_buffer_t; + hb_buffer_t * hb_buffer_create (void); @@ -127,9 +155,21 @@ hb_buffer_set_language (hb_buffer_t *buffer, hb_language_t language); + hb_language_t hb_buffer_get_language (hb_buffer_t *buffer); +void +hb_buffer_set_segment_properties (hb_buffer_t *buffer, + const hb_segment_properties_t *props); + +void +hb_buffer_get_segment_properties (hb_buffer_t *buffer, + hb_segment_properties_t *props); + +void +hb_buffer_guess_properties (hb_buffer_t *buffer); + typedef enum { HB_BUFFER_FLAGS_DEFAULT = 0x00000000, @@ -171,9 +211,6 @@ void hb_buffer_reverse_clusters (hb_buffer_t *buffer); -void -hb_buffer_guess_properties (hb_buffer_t *buffer); - /* Filling the buffer in */