[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Jun 20 11:12:11 PDT 2014


 docs/reference/harfbuzz-sections.txt |   23 +++++++++++++++++++----
 src/hb-common.cc                     |   10 +++++-----
 src/hb-ot-shape.h                    |   21 ++++++++++-----------
 src/hb-version.h.in                  |   10 +++++-----
 test/api/test-version.c              |   29 +++++++++++++++--------------
 5 files changed, 54 insertions(+), 39 deletions(-)

New commits:
commit 2b051c6057920c564c13c5d6a3e6dca93446fa12
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Jun 20 14:09:57 2014 -0400

    Rename HB_VERSION_CHECK and hb_version_check to "atleast"
    
    HB_VERSION_CHECK's comparison was originally written wrongly
    by mistake.  When API tests were written, they were also written
    wrongly to pass given the wrong implementation... Sigh.
    
    Given the purpose of this API, there's no point in fixing it
    without renaming it.  As such, rename.
    
    API changes:
    
      HB_VERSION_CHECK -> HB_VERSION_ATLEAST
      hb_version_check -> hb_version_atleast

diff --git a/docs/reference/harfbuzz-sections.txt b/docs/reference/harfbuzz-sections.txt
index 973009c..3612dad 100644
--- a/docs/reference/harfbuzz-sections.txt
+++ b/docs/reference/harfbuzz-sections.txt
@@ -487,12 +487,12 @@ hb_uniscribe_font_get_logfontw
 
 <SECTION>
 <FILE>hb-version</FILE>
-HB_VERSION_CHECK
+HB_VERSION_ATLEAST
 HB_VERSION_MAJOR
 HB_VERSION_MICRO
 HB_VERSION_MINOR
 HB_VERSION_STRING
 hb_version
-hb_version_check
+hb_version_atleast
 hb_version_string
 </SECTION>
diff --git a/src/hb-common.cc b/src/hb-common.cc
index 33d2e55..da5f4f7 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -569,7 +569,7 @@ hb_version_string (void)
 }
 
 /**
- * hb_version_check:
+ * hb_version_atleast:
  * @major: 
  * @minor: 
  * @micro: 
@@ -581,9 +581,9 @@ hb_version_string (void)
  * Since: 1.0
  **/
 hb_bool_t
-hb_version_check (unsigned int major,
-		  unsigned int minor,
-		  unsigned int micro)
+hb_version_atleast (unsigned int major,
+		    unsigned int minor,
+		    unsigned int micro)
 {
-  return HB_VERSION_CHECK (major, minor, micro);
+  return HB_VERSION_ATLEAST (major, minor, micro);
 }
diff --git a/src/hb-version.h.in b/src/hb-version.h.in
index 43634f9..2517160 100644
--- a/src/hb-version.h.in
+++ b/src/hb-version.h.in
@@ -42,8 +42,8 @@ HB_BEGIN_DECLS
 
 #define HB_VERSION_STRING "@HB_VERSION@"
 
-#define HB_VERSION_CHECK(major,minor,micro) \
-	((major)*10000+(minor)*100+(micro) >= \
+#define HB_VERSION_ATLEAST(major,minor,micro) \
+	((major)*10000+(minor)*100+(micro) <= \
 	 HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
 
 
@@ -56,9 +56,9 @@ const char *
 hb_version_string (void);
 
 hb_bool_t
-hb_version_check (unsigned int major,
-		  unsigned int minor,
-		  unsigned int micro);
+hb_version_atleast (unsigned int major,
+		    unsigned int minor,
+		    unsigned int micro);
 
 
 HB_END_DECLS
diff --git a/test/api/test-version.c b/test/api/test-version.c
index 4c9bd37..e6378b6 100644
--- a/test/api/test-version.c
+++ b/test/api/test-version.c
@@ -46,27 +46,28 @@ test_version (void)
   g_free (s);
   g_assert (0 == strcmp (HB_VERSION_STRING, hb_version_string ()));
 
-  g_assert (HB_VERSION_CHECK (major, minor, micro));
-  g_assert (HB_VERSION_CHECK (major+1, minor, micro));
-  g_assert (HB_VERSION_CHECK (major, minor+1, micro));
-  g_assert (HB_VERSION_CHECK (major, minor, micro+1));
+  g_assert (HB_VERSION_ATLEAST (major, minor, micro));
   if (major)
-    g_assert (!HB_VERSION_CHECK (major-1, minor, micro));
+    g_assert (HB_VERSION_ATLEAST (major-1, minor, micro));
   if (minor)
-    g_assert (!HB_VERSION_CHECK (major, minor-1, micro));
+    g_assert (HB_VERSION_ATLEAST (major, minor-1, micro));
   if (micro)
-    g_assert (!HB_VERSION_CHECK (major, minor, micro-1));
+    g_assert (HB_VERSION_ATLEAST (major, minor, micro-1));
+  g_assert (!HB_VERSION_ATLEAST (major+1, minor, micro));
+  g_assert (!HB_VERSION_ATLEAST (major, minor+1, micro));
+  g_assert (!HB_VERSION_ATLEAST (major, minor, micro+1));
+  g_assert (!HB_VERSION_ATLEAST (major, minor, micro+1));
 
-  g_assert (hb_version_check (major, minor, micro));
-  g_assert (hb_version_check (major+1, minor, micro));
-  g_assert (hb_version_check (major, minor+1, micro));
-  g_assert (hb_version_check (major, minor, micro+1));
+  g_assert (hb_version_atleast (major, minor, micro));
   if (major)
-    g_assert (!hb_version_check (major-1, minor, micro));
+    g_assert (hb_version_atleast (major-1, minor, micro));
   if (minor)
-    g_assert (!hb_version_check (major, minor-1, micro));
+    g_assert (hb_version_atleast (major, minor-1, micro));
   if (micro)
-    g_assert (!hb_version_check (major, minor, micro-1));
+    g_assert (hb_version_atleast (major, minor, micro-1));
+  g_assert (!hb_version_atleast (major+1, minor, micro));
+  g_assert (!hb_version_atleast (major, minor+1, micro));
+  g_assert (!hb_version_atleast (major, minor, micro+1));
 }
 
 int
commit cabfa538ed4b1355326fa8de05f7209dda1c1c7a
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Jun 20 13:51:21 2014 -0400

    Adjust unused doc symbols

diff --git a/docs/reference/harfbuzz-sections.txt b/docs/reference/harfbuzz-sections.txt
index 3072ce4..973009c 100644
--- a/docs/reference/harfbuzz-sections.txt
+++ b/docs/reference/harfbuzz-sections.txt
@@ -84,6 +84,7 @@ HB_DIRECTION_REVERSE
 HB_LANGUAGE_INVALID
 HB_TAG
 HB_TAG_NONE
+HB_TAG_MAX
 HB_UNTAG
 hb_bool_t
 hb_codepoint_t
@@ -134,6 +135,9 @@ HB_SCRIPT_CANADIAN_ABORIGINAL
 
 <SECTION>
 <FILE>hb-coretext</FILE>
+HB_CORETEXT_TAG_MORT
+HB_CORETEXT_TAG_MORX
+hb_coretext_face_create
 hb_coretext_face_get_cg_font
 hb_coretext_font_get_ct_font
 </SECTION>
@@ -314,12 +318,21 @@ hb_icu_script_to_script
 
 <SECTION>
 <FILE>hb-ot</FILE>
-hb_ot_shape_glyphs_closure
 <SUBSECTION Private>
 HB_OT_H_IN
 </SECTION>
 
 <SECTION>
+<FILE>hb-ot-font</FILE>
+hb_ot_font_set_funcs
+</SECTION>
+
+<SECTION>
+<FILE>hb-ot-shape</FILE>
+hb_ot_shape_glyphs_closure
+</SECTION>
+
+<SECTION>
 <FILE>hb-ot-layout</FILE>
 HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX
 HB_OT_LAYOUT_NO_FEATURE_INDEX
@@ -342,7 +355,7 @@ hb_ot_layout_has_substitution
 hb_ot_layout_language_find_feature
 hb_ot_layout_language_get_feature_indexes
 hb_ot_layout_language_get_feature_tags
-hb_ot_layout_language_get_required_feature_index
+hb_ot_layout_language_get_required_feature
 hb_ot_layout_lookup_collect_glyphs
 hb_ot_layout_lookup_substitute_closure
 hb_ot_layout_lookup_would_substitute
@@ -352,6 +365,7 @@ hb_ot_layout_table_choose_script
 hb_ot_layout_table_find_script
 hb_ot_layout_table_get_feature_tags
 hb_ot_layout_table_get_script_tags
+hb_ot_layout_table_get_lookup_count
 hb_ot_shape_plan_collect_lookups
 <SUBSECTION Private>
 Xhb_ot_layout_lookup_enumerate_sequences
@@ -371,6 +385,7 @@ hb_ot_tags_from_script
 
 <SECTION>
 <FILE>hb-set</FILE>
+HB_SET_VALUE_INVALID
 hb_set_add
 hb_set_add_range
 hb_set_allocation_successful
diff --git a/src/hb-ot-shape.h b/src/hb-ot-shape.h
index afe6fe9..1402f54 100644
--- a/src/hb-ot-shape.h
+++ b/src/hb-ot-shape.h
@@ -24,31 +24,30 @@
  * Red Hat Author(s): Behdad Esfahbod
  */
 
+#ifndef HB_OT_H_IN
+#error "Include <hb-ot.h> instead."
+#endif
+
 #ifndef HB_OT_SHAPE_H
 #define HB_OT_SHAPE_H
-#define HB_OT_SHAPE_H_IN
 
 #include "hb.h"
 
-#include "hb-ot-layout.h"
-#include "hb-ot-tag.h"
-
 HB_BEGIN_DECLS
 
 /* TODO port to shape-plan / set. */
 void
 hb_ot_shape_glyphs_closure (hb_font_t          *font,
-                hb_buffer_t        *buffer,
-                const hb_feature_t *features,
-                unsigned int        num_features,
-                hb_set_t           *glyphs);
+			    hb_buffer_t        *buffer,
+			    const hb_feature_t *features,
+			    unsigned int        num_features,
+			    hb_set_t           *glyphs);
 
 void
 hb_ot_shape_plan_collect_lookups (hb_shape_plan_t *shape_plan,
-                hb_tag_t         table_tag,
-                hb_set_t        *lookup_indexes /* OUT */);
+				  hb_tag_t         table_tag,
+				  hb_set_t        *lookup_indexes /* OUT */);
 
 HB_END_DECLS
 
-#undef HB_OT_SHAPE_H_IN
 #endif /* HB_OT_SHAPE_H */


More information about the HarfBuzz mailing list