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

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Feb 22 06:38:52 UTC 2016


 Makefile.am                          |    1 +
 src/hb-open-file-private.hh          |    4 ++--
 src/hb-open-type-private.hh          |    9 +++++----
 src/hb-ot-head-table.hh              |    4 ++--
 src/hb-ot-hhea-table.hh              |    2 +-
 src/hb-ot-layout-gdef-table.hh       |    2 +-
 src/hb-ot-layout-gsubgpos-private.hh |    2 +-
 src/hb-ot-layout-jstf-table.hh       |    2 +-
 src/hb-ot-maxp-table.hh              |    2 +-
 win32/Makefile.am                    |    2 ++
 10 files changed, 17 insertions(+), 13 deletions(-)

New commits:
commit ca539e37a4b71e585a267a288db1a3975cbb99fc
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Feb 22 15:37:18 2016 +0900

    [build] git.mk fix for m4/gtk-doc.m4

diff --git a/Makefile.am b/Makefile.am
index 8987d57..d56a151 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,7 @@ MAINTAINERCLEANFILES = \
 	$(srcdir)/INSTALL \
 	$(srcdir)/ChangeLog \
 	$(srcdir)/gtk-doc.make \
+	$(srcdir)/m4/gtk-doc.m4 \
 	$(NULL)
 
 
commit 54788cb1ecc5a5ffd63d07cd1f0b07b2afa9a8ca
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Feb 22 15:32:52 2016 +0900

    [win32] Install git.mk

diff --git a/win32/Makefile.am b/win32/Makefile.am
index be7a477..63ba468 100644
--- a/win32/Makefile.am
+++ b/win32/Makefile.am
@@ -12,3 +12,5 @@ EXTRA_DIST = \
 	introspection-msvc.mak \
 	Makefile.vc \
 	README.txt
+
+-include $(top_srcdir)/git.mk
commit 9a13ed453ef96822a47d6e6f58332b87f38d5c59
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Feb 22 11:44:45 2016 +0900

    Make FixedVersion a template

diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh
index 152230a..5357ddc 100644
--- a/src/hb-open-file-private.hh
+++ b/src/hb-open-file-private.hh
@@ -140,7 +140,7 @@ struct TTCHeaderVersion1
 
   protected:
   Tag		ttcTag;		/* TrueType Collection ID string: 'ttcf' */
-  FixedVersion	version;	/* Version of the TTC Header (1.0),
+  FixedVersion<>version;	/* Version of the TTC Header (1.0),
 				 * 0x00010000u */
   ArrayOf<OffsetTo<OffsetTable, ULONG>, ULONG>
 		table;		/* Array of offsets to the OffsetTable for each font
@@ -187,7 +187,7 @@ struct TTCHeader
   union {
   struct {
   Tag		ttcTag;		/* TrueType Collection ID string: 'ttcf' */
-  FixedVersion	version;	/* Version of the TTC Header (1.0 or 2.0),
+  FixedVersion<>version;	/* Version of the TTC Header (1.0 or 2.0),
 				 * 0x00010000u or 0x00020000u */
   }			header;
   TTCHeaderVersion1	version1;
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index 6323da8..6a52000 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -739,9 +739,10 @@ struct CheckSum : ULONG
  * Version Numbers
  */
 
+template <typename FixedType=USHORT>
 struct FixedVersion
 {
-  inline uint32_t to_int (void) const { return (major << 16) + minor; }
+  inline uint32_t to_int (void) const { return (major << sizeof(FixedType)) + minor; }
 
   inline bool sanitize (hb_sanitize_context_t *c) const
   {
@@ -749,10 +750,10 @@ struct FixedVersion
     return_trace (c->check_struct (this));
   }
 
-  USHORT major;
-  USHORT minor;
+  FixedType major;
+  FixedType minor;
   public:
-  DEFINE_SIZE_STATIC (4);
+  DEFINE_SIZE_STATIC (2 * sizeof(FixedType));
 };
 
 
diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh
index 60644be..9c3e51e 100644
--- a/src/hb-ot-head-table.hh
+++ b/src/hb-ot-head-table.hh
@@ -61,9 +61,9 @@ struct head
   }
 
   protected:
-  FixedVersion	version;		/* Version of the head table--currently
+  FixedVersion<>version;		/* Version of the head table--currently
 					 * 0x00010000u for version 1.0. */
-  FixedVersion	fontRevision;		/* Set by font manufacturer. */
+  FixedVersion<>fontRevision;		/* Set by font manufacturer. */
   ULONG		checkSumAdjustment;	/* To compute: set it to 0, sum the
 					 * entire font as ULONG, then store
 					 * 0xB1B0AFBAu - sum. */
diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh
index 2411453..c8e9536 100644
--- a/src/hb-ot-hhea-table.hh
+++ b/src/hb-ot-hhea-table.hh
@@ -56,7 +56,7 @@ struct _hea
   }
 
   public:
-  FixedVersion	version;		/* 0x00010000u for version 1.0. */
+  FixedVersion<>version;		/* 0x00010000u for version 1.0. */
   FWORD		ascender;		/* Typographic ascent. */
   FWORD		descender;		/* Typographic descent. */
   FWORD		lineGap;		/* Typographic line gap. */
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
index bc36436..2b4bc5a 100644
--- a/src/hb-ot-layout-gdef-table.hh
+++ b/src/hb-ot-layout-gdef-table.hh
@@ -409,7 +409,7 @@ struct GDEF
 
 
   protected:
-  FixedVersion	version;		/* Version of the GDEF table--currently
+  FixedVersion<>version;		/* Version of the GDEF table--currently
 					 * 0x00010002u */
   OffsetTo<ClassDef>
 		glyphClassDef;		/* Offset to class definition table
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 3f9d9ca..691334c 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -2277,7 +2277,7 @@ struct GSUBGPOS
   }
 
   protected:
-  FixedVersion	version;	/* Version of the GSUB/GPOS table--initially set
+  FixedVersion<>version;	/* Version of the GSUB/GPOS table--initially set
 				 * to 0x00010000u */
   OffsetTo<ScriptList>
 		scriptList;  	/* ScriptList table */
diff --git a/src/hb-ot-layout-jstf-table.hh b/src/hb-ot-layout-jstf-table.hh
index 7e199c2..c306849 100644
--- a/src/hb-ot-layout-jstf-table.hh
+++ b/src/hb-ot-layout-jstf-table.hh
@@ -218,7 +218,7 @@ struct JSTF
   }
 
   protected:
-  FixedVersion	version;	/* Version of the JSTF table--initially set
+  FixedVersion<>version;	/* Version of the JSTF table--initially set
 				 * to 0x00010000u */
   RecordArrayOf<JstfScript>
 		scriptList;  	/* Array of JstfScripts--listed
diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh
index 27105af..943e390 100644
--- a/src/hb-ot-maxp-table.hh
+++ b/src/hb-ot-maxp-table.hh
@@ -58,7 +58,7 @@ struct maxp
 
   /* We only implement version 0.5 as none of the extra fields in version 1.0 are useful. */
   protected:
-  FixedVersion	version;		/* Version of the maxp table (0.5 or 1.0),
+  FixedVersion<>version;		/* Version of the maxp table (0.5 or 1.0),
 					 * 0x00005000u or 0x00010000u. */
   USHORT	numGlyphs;		/* The number of glyphs in the font. */
   public:


More information about the HarfBuzz mailing list