[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Nov 2 21:18:15 UTC 2018


 src/hb-ot-hmtx-table.hh |    6 +++---
 src/hb-ot-os2-table.hh  |   12 ++++++------
 src/hb-subset.cc        |    4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 2c68f34bddbe506d0b22948562f2f59b9a5b6050
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Fri Nov 2 23:06:00 2018 +0200

    [os2] Capitalize table tag and struct
    
    Other tables follow the case of the OT tag, except this one.

diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
index 1eb6cc68..f898a033 100644
--- a/src/hb-ot-hmtx-table.hh
+++ b/src/hb-ot-hmtx-table.hh
@@ -194,8 +194,8 @@ struct hmtxvmtx
       bool got_font_extents = false;
       if (T::os2Tag)
       {
-	hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<os2> (face);
-	const os2 *os2_table = os2_blob->as<os2> ();
+	hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<OS2> (face);
+	const OS2 *os2_table = os2_blob->as<OS2> ();
 #define USE_TYPO_METRICS (1u<<7)
 	if (0 != (os2_table->fsSelection & USE_TYPO_METRICS))
 	{
@@ -336,7 +336,7 @@ struct hmtxvmtx
 struct hmtx : hmtxvmtx<hmtx, hhea> {
   static const hb_tag_t tableTag	= HB_OT_TAG_hmtx;
   static const hb_tag_t variationsTag	= HB_OT_TAG_HVAR;
-  static const hb_tag_t os2Tag		= HB_OT_TAG_os2;
+  static const hb_tag_t os2Tag		= HB_OT_TAG_OS2;
 };
 struct vmtx : hmtxvmtx<vmtx, vhea> {
   static const hb_tag_t tableTag	= HB_OT_TAG_vmtx;
diff --git a/src/hb-ot-os2-table.hh b/src/hb-ot-os2-table.hh
index 71d2bf59..b2495128 100644
--- a/src/hb-ot-os2-table.hh
+++ b/src/hb-ot-os2-table.hh
@@ -36,11 +36,11 @@ namespace OT {
  * OS/2 and Windows Metrics
  * https://docs.microsoft.com/en-us/typography/opentype/spec/os2
  */
-#define HB_OT_TAG_os2 HB_TAG('O','S','/','2')
+#define HB_OT_TAG_OS2 HB_TAG('O','S','/','2')
 
-struct os2
+struct OS2
 {
-  static const hb_tag_t tableTag = HB_OT_TAG_os2;
+  static const hb_tag_t tableTag = HB_OT_TAG_OS2;
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
@@ -50,12 +50,12 @@ struct os2
 
   inline bool subset (hb_subset_plan_t *plan) const
   {
-    hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<os2> (plan->source);
+    hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<OS2> (plan->source);
     hb_blob_t *os2_prime_blob = hb_blob_create_sub_blob (os2_blob, 0, -1);
     // TODO(grieger): move to hb_blob_copy_writable_or_fail
     hb_blob_destroy (os2_blob);
 
-    os2 *os2_prime = (os2 *) hb_blob_get_data_writable (os2_prime_blob, nullptr);
+    OS2 *os2_prime = (OS2 *) hb_blob_get_data_writable (os2_prime_blob, nullptr);
     if (unlikely (!os2_prime)) {
       hb_blob_destroy (os2_prime_blob);
       return false;
@@ -67,7 +67,7 @@ struct os2
     os2_prime->usLastCharIndex.set (max_cp);
 
     _update_unicode_ranges (plan->unicodes, os2_prime->ulUnicodeRange);
-    bool result = plan->add_table (HB_OT_TAG_os2, os2_prime_blob);
+    bool result = plan->add_table (HB_OT_TAG_OS2, os2_prime_blob);
 
     hb_blob_destroy (os2_prime_blob);
     return result;
diff --git a/src/hb-subset.cc b/src/hb-subset.cc
index ed61c628..a1c52c57 100644
--- a/src/hb-subset.cc
+++ b/src/hb-subset.cc
@@ -171,8 +171,8 @@ _subset_table (hb_subset_plan_t *plan,
     case HB_OT_TAG_cmap:
       result = _subset<const OT::cmap> (plan);
       break;
-    case HB_OT_TAG_os2:
-      result = _subset<const OT::os2> (plan);
+    case HB_OT_TAG_OS2:
+      result = _subset<const OT::OS2> (plan);
       break;
     case HB_OT_TAG_post:
       result = _subset<const OT::post> (plan);


More information about the HarfBuzz mailing list