Change hb_shape() API back to what it was, add hb_shape_full() I disliked changing hb_shape() API, and disliked the fact that it was returning a bool now. So, reverted. Added new API for the extra functionality.
diff --git a/src/hb-shape.cc b/src/hb-shape.cc index 9ebbd81..18dc6c1 100644 --- a/src/hb-shape.cc +++ b/src/hb-shape.cc
@@ -87,12 +87,12 @@ } env_shaper_list; hb_bool_t -hb_shape (hb_font_t *font, - hb_buffer_t *buffer, - const hb_feature_t *features, - unsigned int num_features, - const char *shaper_options, - const char **shaper_list) +hb_shape_full (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + const char *shaper_options, + const char **shaper_list) { if (likely (!shaper_list)) shaper_list = env_shaper_list.shaper_list; @@ -116,3 +116,12 @@ } return FALSE; } + +void +hb_shape (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features) +{ + hb_shape_full (font, buffer, features, num_features, NULL, NULL); +}
diff --git a/src/hb-shape.h b/src/hb-shape.h index b2193f7..75818dc 100644 --- a/src/hb-shape.h +++ b/src/hb-shape.h
@@ -42,13 +42,19 @@ } hb_feature_t; -hb_bool_t +void hb_shape (hb_font_t *font, hb_buffer_t *buffer, const hb_feature_t *features, - unsigned int num_features, - const char *shaper_options, - const char **shaper_list); + unsigned int num_features); + +hb_bool_t +hb_shape_full (hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features, + const char *shaper_options, + const char **shaper_list); HB_END_DECLS
diff --git a/src/test.cc b/src/test.cc index 8679b33..860e4d2 100644 --- a/src/test.cc +++ b/src/test.cc
@@ -96,7 +96,7 @@ hb_buffer_add_utf8 (buffer, "test", 4, 0, 4); - hb_shape (font, buffer, NULL, 0, NULL, NULL); + hb_shape (font, buffer, NULL, 0); unsigned int count = hb_buffer_get_length (buffer); hb_glyph_info_t *infos = hb_buffer_get_glyph_infos (buffer, NULL);
diff --git a/test/test-shape.c b/test/test-shape.c index a8b7f1d..5a41f0c 100644 --- a/test/test-shape.c +++ b/test/test-shape.c
@@ -110,7 +110,7 @@ hb_buffer_set_direction (buffer, HB_DIRECTION_LTR); hb_buffer_add_utf8 (buffer, TesT, 4, 0, 4); - hb_shape (font, buffer, NULL, 0, NULL, NULL); + hb_shape (font, buffer, NULL, 0); len = hb_buffer_get_length (buffer); glyphs = hb_buffer_get_glyph_infos (buffer, NULL);