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

Behdad Esfahbod behdad at kemper.freedesktop.org
Sun Oct 28 15:27:08 UTC 2018


 docs/harfbuzz-sections.txt    |    2 --
 src/hb-map.cc                 |    2 +-
 src/hb-ot-color-cpal-table.hh |    4 ++--
 src/hb-ot-layout.cc           |   12 ++++++------
 src/hb-ot-name-table.hh       |    2 +-
 src/hb-ot-name.h              |    6 +++---
 src/hb-set.cc                 |    2 +-
 src/hb-shape-plan.cc          |    2 +-
 src/test-size-params.cc       |    2 +-
 9 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit 6ce49a921a80f1238ddc537f77a1fceea5274a21
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Oct 28 08:26:30 2018 -0700

    [name] Change hb_name_id_t back to unsigned int
    
    https://github.com/harfbuzz/harfbuzz/commit/d941f66c75fe26f909b1ba248535cc372bbde851#commitcomment-31076011

diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index 3ba5b8ce..9d4edc26 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -360,7 +360,6 @@ HB_GOBJECT_TYPE_FONT_FUNCS
 HB_GOBJECT_TYPE_GLYPH_FLAGS
 HB_GOBJECT_TYPE_MAP
 HB_GOBJECT_TYPE_MEMORY_MODE
-HB_GOBJECT_TYPE_NAME_ID
 HB_GOBJECT_TYPE_OT_COLOR_PALETTE_FLAGS
 HB_GOBJECT_TYPE_OT_LAYOUT_GLYPH_CLASS
 HB_GOBJECT_TYPE_OT_MATH_CONSTANT
@@ -394,7 +393,6 @@ hb_gobject_font_get_type
 hb_gobject_glyph_flags_get_type
 hb_gobject_map_get_type
 hb_gobject_memory_mode_get_type
-hb_gobject_name_id_get_type
 hb_gobject_ot_color_palette_flags_get_type
 hb_gobject_ot_layout_glyph_class_get_type
 hb_gobject_ot_math_constant_get_type
diff --git a/src/hb-ot-color-cpal-table.hh b/src/hb-ot-color-cpal-table.hh
index 0e13bece..0b4bf377 100644
--- a/src/hb-ot-color-cpal-table.hh
+++ b/src/hb-ot-color-cpal-table.hh
@@ -64,7 +64,7 @@ struct CPALV1Tail
 		       unsigned int palette_count) const
   {
     if (!paletteLabelsZ) return HB_NAME_ID_INVALID;
-    return (hb_name_id_t) (unsigned) hb_array (base+paletteLabelsZ, palette_count)[palette_index];
+    return hb_array (base+paletteLabelsZ, palette_count)[palette_index];
   }
 
   inline hb_name_id_t
@@ -73,7 +73,7 @@ struct CPALV1Tail
 		     unsigned int color_count) const
   {
     if (!colorLabelsZ) return HB_NAME_ID_INVALID;
-    return (hb_name_id_t) (unsigned) hb_array (base+colorLabelsZ, color_count)[color_index];
+    return hb_array (base+colorLabelsZ, color_count)[color_index];
   }
 
   public:
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 6c5f0d40..19f80040 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -1075,7 +1075,7 @@ hb_ot_layout_get_size_params (hb_face_t    *face,
       {
 	if (design_size) *design_size = params.designSize;
 	if (subfamily_id) *subfamily_id = params.subfamilyID;
-	if (subfamily_name_id) *subfamily_name_id = (hb_name_id_t) (unsigned) params.subfamilyNameID;
+	if (subfamily_name_id) *subfamily_name_id = params.subfamilyNameID;
 	if (range_start) *range_start = params.rangeStart;
 	if (range_end) *range_end = params.rangeEnd;
 
@@ -1139,7 +1139,7 @@ hb_ot_layout_feature_get_name_ids (hb_face_t    *face,
       feature_params.get_stylistic_set_params (feature_tag);
     if (&ss_params != &Null (OT::FeatureParamsStylisticSet)) /* ssXX */
     {
-      if (label_id) *label_id = (hb_name_id_t) (unsigned) ss_params.uiNameID;
+      if (label_id) *label_id = ss_params.uiNameID;
       // ssXX features don't have the rest
       if (tooltip_id) *tooltip_id = HB_NAME_ID_INVALID;
       if (sample_id) *sample_id = HB_NAME_ID_INVALID;
@@ -1151,11 +1151,11 @@ hb_ot_layout_feature_get_name_ids (hb_face_t    *face,
       feature_params.get_character_variants_params (feature_tag);
     if (&cv_params != &Null (OT::FeatureParamsCharacterVariants)) /* cvXX */
     {
-      if (label_id) *label_id = (hb_name_id_t) (unsigned) cv_params.featUILableNameID;
-      if (tooltip_id) *tooltip_id = (hb_name_id_t) (unsigned) cv_params.featUITooltipTextNameID;
-      if (sample_id) *sample_id = (hb_name_id_t) (unsigned) cv_params.sampleTextNameID;
+      if (label_id) *label_id = cv_params.featUILableNameID;
+      if (tooltip_id) *tooltip_id = cv_params.featUITooltipTextNameID;
+      if (sample_id) *sample_id = cv_params.sampleTextNameID;
       if (num_named_parameters) *num_named_parameters = cv_params.numNamedParameters;
-      if (first_param_id) *first_param_id = (hb_name_id_t) (unsigned) cv_params.firstParamUILabelNameID;
+      if (first_param_id) *first_param_id = cv_params.firstParamUILabelNameID;
       return true;
     }
   }
diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh
index daf78c89..b84edd18 100644
--- a/src/hb-ot-name-table.hh
+++ b/src/hb-ot-name-table.hh
@@ -194,7 +194,7 @@ struct name
       {
 	hb_ot_name_entry_t *entry = this->names.push ();
 
-	entry->name_id = (hb_name_id_t) (unsigned) all_names[i].nameID;
+	entry->name_id = all_names[i].nameID;
 	entry->language = all_names[i].language (face);
 	entry->entry_score =  all_names[i].score ();
 	entry->entry_index = i;
diff --git a/src/hb-ot-name.h b/src/hb-ot-name.h
index b406c090..e4ef5f07 100644
--- a/src/hb-ot-name.h
+++ b/src/hb-ot-name.h
@@ -44,7 +44,7 @@ HB_BEGIN_DECLS
  *
  * Since: 2.0.0
  **/
-typedef enum
+enum
 {
   HB_NAME_ID_COPYRIGHT			= 0,
   HB_NAME_ID_FONT_FAMILY		= 1,
@@ -74,9 +74,9 @@ typedef enum
   HB_NAME_ID_VARIATIONS_PS_PREFIX	= 25,
 
   HB_NAME_ID_INVALID			= 0xFFFF,
+};
 
-  _HB_NAME_ID_MAX_VALUE_SIGNED		= 0x7FFFFFFF /*< skip >*/ /* So we get int-sized. */
-} hb_name_id_t;
+typedef unsigned int hb_name_id_t;
 
 
 /**
diff --git a/src/test-size-params.cc b/src/test-size-params.cc
index b0905d5a..12eec618 100644
--- a/src/test-size-params.cc
+++ b/src/test-size-params.cc
@@ -46,7 +46,7 @@ main (int argc, char **argv)
   blob = nullptr;
 
   unsigned int p[5];
-  bool ret = hb_ot_layout_get_size_params (face, p, p+1, (hb_name_id_t *) (p+2), p+3, p+4);
+  bool ret = hb_ot_layout_get_size_params (face, p, p+1, (p+2), p+3, p+4);
 
   printf ("%g %u %u %g %g\n", p[0]/10., p[1], p[2], p[3]/10., p[4]/10.);
 
commit a4f4f5ba5f64174dea931e02367aa4067d034383
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Oct 28 08:23:36 2018 -0700

    [docs] Fix titles here as well

diff --git a/src/hb-map.cc b/src/hb-map.cc
index e8339649..067a2b37 100644
--- a/src/hb-map.cc
+++ b/src/hb-map.cc
@@ -29,7 +29,7 @@
 
 /**
  * SECTION:hb-map
- * @title: hb_map_t
+ * @title: hb-map
  * @short_description: Object representing integer to integer mapping
  * @include: hb.h
  *
diff --git a/src/hb-set.cc b/src/hb-set.cc
index 2a4b356c..67ec5618 100644
--- a/src/hb-set.cc
+++ b/src/hb-set.cc
@@ -29,7 +29,7 @@
 
 /**
  * SECTION:hb-set
- * @title: hb_set_t
+ * @title: hb-set
  * @short_description: Object representing a set of integers
  * @include: hb.h
  *
diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc
index abffd40d..4648cc75 100644
--- a/src/hb-shape-plan.cc
+++ b/src/hb-shape-plan.cc
@@ -33,7 +33,7 @@
 
 /**
  * SECTION:hb-shape-plan
- * @title: hb_shape_plan_t
+ * @title: hb-shape-plan
  * @short_description: Object representing a shaping plan
  * @include: hb.h
  *


More information about the HarfBuzz mailing list