[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Aug 5 14:23:14 PDT 2011


 src/hb-shape.cc   |   21 +++++++++++++++------
 src/hb-shape.h    |   14 ++++++++++----
 src/test.cc       |    2 +-
 test/test-shape.c |    2 +-
 4 files changed, 27 insertions(+), 12 deletions(-)

New commits:
commit 3ca6c4ecc299295b6682fa2b6b9f83b213223bad
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Aug 5 17:22:19 2011 -0400

    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 @@ static class static_shaper_list_t {
 } 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 @@ hb_shape (hb_font_t           *font,
   }
   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 @@ typedef struct _hb_feature_t {
 } 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 @@ main (int argc, char **argv)
 
   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 @@ test_shape (void)
   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);



More information about the HarfBuzz mailing list