Behdad Esfahbod | 19 Dec 03:24 2014

harfbuzz: Branch 'master' - 2 commits

 src/hb-blob.cc              |    5 ++++-
 src/hb-open-type-private.hh |    1 +
 test/api/test-blob.c        |    3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 7d5e7613ced3dd39d05df83ca7e8952cbecd68f6
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Thu Dec 18 18:22:21 2014 -0800

    Fail blob creation if length overflows or is too large

    Fail if blob start plus length overflows; or if blob length
    is greater than 2GB.  It takes a while for fonts to get to that
    size.  In the mean time, it protects against bugs like this:

      http://www.icu-project.org/trac/ticket/11450

    Also avoids some weird issues with 32bit vs 64bit systems
    as we accept length as unsigned int.  As such, a length of
    -1 will cause overflow on 32bit machines, but happily
    accepted on a 64bit machine.  Avoid that.

diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index b82b4b2..4437930 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
 <at>  <at>  -102,7 +102,10  <at>  <at>  hb_blob_create (const char        *data,
 {
   hb_blob_t *blob;
(Continue reading)

Travis CI | 17 Dec 21:35 2014

Passed: behdad/harfbuzz#439 (0.9.37 - 66e3740)

behdad / harfbuzz (0.9.37)
Build #439 passed.
4 minutes and 19 seconds
Behdad Esfahbod 66e3740 Changeset →
  0.9.37
System message:

Go and Python VMs have been updated. http://docs.travis-ci.com/user/build-environment-updates/2014-12-16/

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! Sign up here.

Would you like to test your private code?

Travis Pro could be your new best friend!

_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 17 Dec 21:30 2014

harfbuzz: Changes to 'refs/tags/0.9.37'

Tag '0.9.37' created by Behdad Esfahbod <behdad <at> behdad.org> at 2014-12-17 20:09 -0800

0.9.37
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEABECAAYFAlSR4vkACgkQn+4E5dNTERWESQCeL/0ia8DuQ4YPswpyGGHxZnve
sPIAnR07/I2jaBDad7meqRe1vG5lHTFJ
=7Vl1
-----END PGP SIGNATURE-----

Changes since 0.9.36-9:
---
 0 files changed
---
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 17 Dec 21:30 2014

harfbuzz: Branch 'master'

 NEWS         |    8 ++++++++
 configure.ac |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 66e37409b3bc1eddc86704ae26d9176677ce6aa6
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Wed Dec 17 12:09:17 2014 -0800

    0.9.37

diff --git a/NEWS b/NEWS
index 21390c6..e3b69d3 100644
--- a/NEWS
+++ b/NEWS
 <at>  <at>  -1,3 +1,11  <at>  <at> 
+Overview of changes leading to 0.9.37
+Wednesday, December 17, 2014
+=====================================
+
+- Fix out-of-bounds access in Context lookup format 3.
+- Indic: Allow ZWJ/ZWNJ before syllable modifiers.
+
+
 Overview of changes leading to 0.9.36
 Thursday, November 20, 2014
 =====================================
diff --git a/configure.ac b/configure.ac
index d8b7a03..ec41748 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -1,6 +1,6  <at>  <at> 
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [0.9.36],
+        [0.9.37],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
         [harfbuzz],
         [http://harfbuzz.org/])
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 16 Dec 23:35 2014

harfbuzz: Branch 'master' - 8 commits

 src/hb-open-file-private.hh          |    2 
 src/hb-open-type-private.hh          |   44 ++++++++++----------
 src/hb-ot-hhea-table.hh              |    2 
 src/hb-ot-hmtx-table.hh              |    2 
 src/hb-ot-layout-gpos-table.hh       |   40 +++++++++---------
 src/hb-ot-layout-gsub-table.hh       |   14 +++---
 src/hb-ot-layout-gsubgpos-private.hh |   74 ++++++++++++++++++-----------------
 src/hb-private.hh                    |    4 +
 8 files changed, 99 insertions(+), 83 deletions(-)

New commits:
commit 093c520de506aec74f3fb1e195c0ca85813424dd
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 21:07:53 2014 -0800

    [otlayout] Mark variables that are C arrays as opposed to OT::ArrayOf

diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 84a7fc7..4255f5a 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
 <at>  <at>  -345,8 +345,8  <at>  <at>  struct AnchorMatrix
   inline const Anchor& get_anchor (unsigned int row, unsigned int col, unsigned int cols, bool *found)
const {
     *found = false;
     if (unlikely (row >= rows || col >= cols)) return Null(Anchor);
-    *found = !matrix[row * cols + col].is_null ();
-    return this+matrix[row * cols + col];
+    *found = !matrixZ[row * cols + col].is_null ();
+    return this+matrixZ[row * cols + col];
   }

   inline bool sanitize (hb_sanitize_context_t *c, unsigned int cols) {
 <at>  <at>  -354,19 +354,19  <at>  <at>  struct AnchorMatrix
     if (!c->check_struct (this)) return TRACE_RETURN (false);
     if (unlikely (rows > 0 && cols >= ((unsigned int) -1) / rows)) return TRACE_RETURN (false);
     unsigned int count = rows * cols;
-    if (!c->check_array (matrix, matrix[0].static_size, count)) return TRACE_RETURN (false);
+    if (!c->check_array (matrixZ, matrixZ[0].static_size, count)) return TRACE_RETURN (false);
     for (unsigned int i = 0; i < count; i++)
-      if (!matrix[i].sanitize (c, this)) return TRACE_RETURN (false);
+      if (!matrixZ[i].sanitize (c, this)) return TRACE_RETURN (false);
     return TRACE_RETURN (true);
   }

   USHORT	rows;			/* Number of rows */
   protected:
   OffsetTo<Anchor>
-		matrix[VAR];		/* Matrix of offsets to Anchor tables--
+		matrixZ[VAR];		/* Matrix of offsets to Anchor tables--
 					 * from beginning of AnchorMatrix table */
   public:
-  DEFINE_SIZE_ARRAY (2, matrix);
+  DEFINE_SIZE_ARRAY (2, matrixZ);
 };

 
 <at>  <at>  -583,7 +583,7  <at>  <at>  struct PairSet
     unsigned int len2 = valueFormats[1].get_len ();
     unsigned int record_size = USHORT::static_size * (1 + len1 + len2);

-    const PairValueRecord *record = CastP<PairValueRecord> (array);
+    const PairValueRecord *record = CastP<PairValueRecord> (arrayZ);
     unsigned int count = len;
     for (unsigned int i = 0; i < count; i++)
     {
 <at>  <at>  -602,7 +602,7  <at>  <at>  struct PairSet
     unsigned int len2 = valueFormats[1].get_len ();
     unsigned int record_size = USHORT::static_size * (1 + len1 + len2);

-    const PairValueRecord *record = CastP<PairValueRecord> (array);
+    const PairValueRecord *record = CastP<PairValueRecord> (arrayZ);
     unsigned int count = len;
     for (unsigned int i = 0; i < count; i++)
     {
 <at>  <at>  -634,20 +634,20  <at>  <at>  struct PairSet
   inline bool sanitize (hb_sanitize_context_t *c, const sanitize_closure_t *closure) {
     TRACE_SANITIZE (this);
     if (!(c->check_struct (this)
-       && c->check_array (array, USHORT::static_size * closure->stride, len))) return TRACE_RETURN (false);
+       && c->check_array (arrayZ, USHORT::static_size * closure->stride, len))) return TRACE_RETURN (false);

     unsigned int count = len;
-    PairValueRecord *record = CastP<PairValueRecord> (array);
+    PairValueRecord *record = CastP<PairValueRecord> (arrayZ);
     return TRACE_RETURN (closure->valueFormats[0].sanitize_values_stride_unsafe (c, closure->base,
&record->values[0], count, closure->stride)
 		      && closure->valueFormats[1].sanitize_values_stride_unsafe (c, closure->base,
&record->values[closure->len1], count, closure->stride));
   }

   protected:
   USHORT	len;			/* Number of PairValueRecords */
-  USHORT	array[VAR];		/* Array of PairValueRecords--ordered
+  USHORT	arrayZ[VAR];		/* Array of PairValueRecords--ordered
 					 * by GlyphID of the second glyph */
   public:
-  DEFINE_SIZE_ARRAY (2, array);
+  DEFINE_SIZE_ARRAY (2, arrayZ);
 };

 struct PairPosFormat1
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index dafca7f..57fc1e0 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
 <at>  <at>  -1136,9 +1136,9  <at>  <at>  struct Rule
   inline void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
   {
     TRACE_CLOSURE (this);
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size *
(inputCount ? inputCount - 1 : 0));
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (inputZ, inputZ[0].static_size
* (inputCount ? inputCount - 1 : 0));
     context_closure_lookup (c,
-			    inputCount, input,
+			    inputCount, inputZ,
 			    lookupCount, lookupRecord,
 			    lookup_context);
   }
 <at>  <at>  -1146,9 +1146,9  <at>  <at>  struct Rule
   inline void collect_glyphs (hb_collect_glyphs_context_t *c, ContextCollectGlyphsLookupContext
&lookup_context) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size *
(inputCount ? inputCount - 1 : 0));
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (inputZ, inputZ[0].static_size
* (inputCount ? inputCount - 1 : 0));
     context_collect_glyphs_lookup (c,
-				   inputCount, input,
+				   inputCount, inputZ,
 				   lookupCount, lookupRecord,
 				   lookup_context);
   }
 <at>  <at>  -1156,15 +1156,15  <at>  <at>  struct Rule
   inline bool would_apply (hb_would_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
   {
     TRACE_WOULD_APPLY (this);
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size *
(inputCount ? inputCount - 1 : 0));
-    return TRACE_RETURN (context_would_apply_lookup (c, inputCount, input, lookupCount,
lookupRecord, lookup_context));
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (inputZ, inputZ[0].static_size
* (inputCount ? inputCount - 1 : 0));
+    return TRACE_RETURN (context_would_apply_lookup (c, inputCount, inputZ, lookupCount,
lookupRecord, lookup_context));
   }

   inline bool apply (hb_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
   {
     TRACE_APPLY (this);
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size *
(inputCount ? inputCount - 1 : 0));
-    return TRACE_RETURN (context_apply_lookup (c, inputCount, input, lookupCount, lookupRecord, lookup_context));
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (inputZ, inputZ[0].static_size
* (inputCount ? inputCount - 1 : 0));
+    return TRACE_RETURN (context_apply_lookup (c, inputCount, inputZ, lookupCount, lookupRecord, lookup_context));
   }

   public:
 <at>  <at>  -1172,8 +1172,8  <at>  <at>  struct Rule
     TRACE_SANITIZE (this);
     return inputCount.sanitize (c)
 	&& lookupCount.sanitize (c)
-	&& c->check_range (input,
-			   input[0].static_size * inputCount
+	&& c->check_range (inputZ,
+			   inputZ[0].static_size * inputCount
 			   + lookupRecordX[0].static_size * lookupCount);
   }

 <at>  <at>  -1182,12 +1182,12  <at>  <at>  struct Rule
 					 * glyph sequence--includes the first
 					 * glyph */
   USHORT	lookupCount;		/* Number of LookupRecords */
-  USHORT	input[VAR];		/* Array of match inputs--start with
+  USHORT	inputZ[VAR];		/* Array of match inputs--start with
 					 * second glyph */
   LookupRecord	lookupRecordX[VAR];	/* Array of LookupRecords--in
 					 * design order */
   public:
-  DEFINE_SIZE_ARRAY2 (4, input, lookupRecordX);
+  DEFINE_SIZE_ARRAY2 (4, inputZ, lookupRecordX);
 };

 struct RuleSet
 <at>  <at>  -1432,16 +1432,16  <at>  <at>  struct ContextFormat3
   inline void closure (hb_closure_context_t *c) const
   {
     TRACE_CLOSURE (this);
-    if (!(this+coverage[0]).intersects (c->glyphs))
+    if (!(this+coverageZ[0]).intersects (c->glyphs))
       return;

-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage,
coverage[0].static_size * glyphCount);
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverageZ,
coverageZ[0].static_size * glyphCount);
     struct ContextClosureLookupContext lookup_context = {
       {intersects_coverage},
       this
     };
     context_closure_lookup (c,
-			    glyphCount, (const USHORT *) (coverage + 1),
+			    glyphCount, (const USHORT *) (coverageZ + 1),
 			    lookupCount, lookupRecord,
 			    lookup_context);
   }
 <at>  <at>  -1449,16 +1449,16  <at>  <at>  struct ContextFormat3
   inline void collect_glyphs (hb_collect_glyphs_context_t *c) const
   {
     TRACE_COLLECT_GLYPHS (this);
-    (this+coverage[0]).add_coverage (c->input);
+    (this+coverageZ[0]).add_coverage (c->input);

-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage,
coverage[0].static_size * glyphCount);
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverageZ,
coverageZ[0].static_size * glyphCount);
     struct ContextCollectGlyphsLookupContext lookup_context = {
       {collect_coverage},
       this
     };

     context_collect_glyphs_lookup (c,
-				   glyphCount, (const USHORT *) (coverage + 1),
+				   glyphCount, (const USHORT *) (coverageZ + 1),
 				   lookupCount, lookupRecord,
 				   lookup_context);
   }
 <at>  <at>  -1467,42 +1467,42  <at>  <at>  struct ContextFormat3
   {
     TRACE_WOULD_APPLY (this);

-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage,
coverage[0].static_size * glyphCount);
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverageZ,
coverageZ[0].static_size * glyphCount);
     struct ContextApplyLookupContext lookup_context = {
       {match_coverage},
       this
     };
-    return TRACE_RETURN (context_would_apply_lookup (c, glyphCount, (const USHORT *) (coverage + 1),
lookupCount, lookupRecord, lookup_context));
+    return TRACE_RETURN (context_would_apply_lookup (c, glyphCount, (const USHORT *) (coverageZ + 1),
lookupCount, lookupRecord, lookup_context));
   }

   inline const Coverage &get_coverage (void) const
   {
-    return this+coverage[0];
+    return this+coverageZ[0];
   }

   inline bool apply (hb_apply_context_t *c) const
   {
     TRACE_APPLY (this);
-    unsigned int index = (this+coverage[0]).get_coverage (c->buffer->cur().codepoint);
+    unsigned int index = (this+coverageZ[0]).get_coverage (c->buffer->cur().codepoint);
     if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);

-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage,
coverage[0].static_size * glyphCount);
+    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverageZ,
coverageZ[0].static_size * glyphCount);
     struct ContextApplyLookupContext lookup_context = {
       {match_coverage},
       this
     };
-    return TRACE_RETURN (context_apply_lookup (c, glyphCount, (const USHORT *) (coverage + 1),
lookupCount, lookupRecord, lookup_context));
+    return TRACE_RETURN (context_apply_lookup (c, glyphCount, (const USHORT *) (coverageZ + 1),
lookupCount, lookupRecord, lookup_context));
   }

   inline bool sanitize (hb_sanitize_context_t *c) {
     TRACE_SANITIZE (this);
     if (!c->check_struct (this)) return TRACE_RETURN (false);
     unsigned int count = glyphCount;
-    if (!count) return TRACE_RETURN (false); /* We want to access coverage[0] freely. */
-    if (!c->check_array (coverage, coverage[0].static_size, count)) return TRACE_RETURN (false);
+    if (!count) return TRACE_RETURN (false); /* We want to access coverageZ[0] freely. */
+    if (!c->check_array (coverageZ, coverageZ[0].static_size, count)) return TRACE_RETURN (false);
     for (unsigned int i = 0; i < count; i++)
-      if (!coverage[i].sanitize (c, this)) return TRACE_RETURN (false);
-    LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * count);
+      if (!coverageZ[i].sanitize (c, this)) return TRACE_RETURN (false);
+    LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverageZ,
coverageZ[0].static_size * count);
     return TRACE_RETURN (c->check_array (lookupRecord, lookupRecord[0].static_size, lookupCount));
   }

 <at>  <at>  -1512,12 +1512,12  <at>  <at>  struct ContextFormat3
 					 * sequence */
   USHORT	lookupCount;		/* Number of LookupRecords */
   OffsetTo<Coverage>
-		coverage[VAR];		/* Array of offsets to Coverage
+		coverageZ[VAR];		/* Array of offsets to Coverage
 					 * table in glyph sequence order */
   LookupRecord	lookupRecordX[VAR];	/* Array of LookupRecords--in
 					 * design order */
   public:
-  DEFINE_SIZE_ARRAY2 (6, coverage, lookupRecordX);
+  DEFINE_SIZE_ARRAY2 (6, coverageZ, lookupRecordX);
 };

 struct Context
commit 9df0a520306a491f973d42965597bfda6023e508
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 20:54:28 2014 -0800

    [otlayout] Avoid invalid access with Context format 3

diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 6ff15d2..dafca7f 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
 <at>  <at>  -1498,6 +1498,7  <at>  <at>  struct ContextFormat3
     TRACE_SANITIZE (this);
     if (!c->check_struct (this)) return TRACE_RETURN (false);
     unsigned int count = glyphCount;
+    if (!count) return TRACE_RETURN (false); /* We want to access coverage[0] freely. */
     if (!c->check_array (coverage, coverage[0].static_size, count)) return TRACE_RETURN (false);
     for (unsigned int i = 0; i < count; i++)
       if (!coverage[i].sanitize (c, this)) return TRACE_RETURN (false);
 <at>  <at>  -2109,6 +2110,7  <at>  <at>  struct ChainContextFormat3
     if (!backtrack.sanitize (c, this)) return TRACE_RETURN (false);
     OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
     if (!input.sanitize (c, this)) return TRACE_RETURN (false);
+    if (!input.len) return TRACE_RETURN (false); /* To be consistent with Context. */
     OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
     if (!lookahead.sanitize (c, this)) return TRACE_RETURN (false);
     ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
commit 295ef1dd5229f47d8e0eb5b4eb48c90a6b470073
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 20:43:18 2014 -0800

    [ot] Debug get_coverage

diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 0d4a10a..6ff15d2 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
 <at>  <at>  -228,10 +228,14  <at>  <at>  struct hb_collect_glyphs_context_t

 

+#ifndef HB_DEBUG_GET_COVERAGE
+#define HB_DEBUG_GET_COVERAGE (HB_DEBUG+0)
+#endif
+
 struct hb_get_coverage_context_t
 {
   inline const char *get_name (void) { return "GET_COVERAGE"; }
-  static const unsigned int max_debug_depth = 0;
+  static const unsigned int max_debug_depth = HB_DEBUG_GET_COVERAGE;
   typedef const Coverage &return_t;
   template <typename T>
   inline return_t dispatch (const T &obj) { return obj.get_coverage (); }
commit 00f6a8e334ec4c586e4e633a95b411ccb50306d3
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 20:36:49 2014 -0800

    [ot] Print format in dispatch trace

diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 8e2860c..84a7fc7 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
 <at>  <at>  -530,7 +530,7  <at>  <at>  struct SinglePos
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     case 2: return TRACE_RETURN (c->dispatch (u.format2));
 <at>  <at>  -822,7 +822,7  <at>  <at>  struct PairPos
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     case 2: return TRACE_RETURN (c->dispatch (u.format2));
 <at>  <at>  -989,7 +989,7  <at>  <at>  struct CursivePos
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -1088,7 +1088,7  <at>  <at>  struct MarkBasePos
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -1209,7 +1209,7  <at>  <at>  struct MarkLigPos
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -1328,7 +1328,7  <at>  <at>  struct MarkMarkPos
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -1387,7 +1387,7  <at>  <at>  struct PosLookupSubTable
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, lookup_type);
     switch (lookup_type) {
     case Single:		return TRACE_RETURN (u.single.dispatch (c));
     case Pair:			return TRACE_RETURN (u.pair.dispatch (c));
 <at>  <at>  -1488,8 +1488,8  <at>  <at>  struct PosLookup : Lookup
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
     unsigned int lookup_type = get_type ();
+    TRACE_DISPATCH (this, lookup_type);
     unsigned int count = get_subtable_count ();
     for (unsigned int i = 0; i < count; i++) {
       typename context_t::return_t r = get_subtable (i).dispatch (c, lookup_type);
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 7d6a5a7..5d67be0 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
 <at>  <at>  -222,7 +222,7  <at>  <at>  struct SingleSubst
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     case 2: return TRACE_RETURN (c->dispatch (u.format2));
 <at>  <at>  -422,7 +422,7  <at>  <at>  struct MultipleSubst
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -573,7 +573,7  <at>  <at>  struct AlternateSubst
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -889,7 +889,7  <at>  <at>  struct LigatureSubst
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -1053,7 +1053,7  <at>  <at>  struct ReverseChainSingleSubst
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     default:return TRACE_RETURN (c->default_return_value ());
 <at>  <at>  -1100,7 +1100,7  <at>  <at>  struct SubstLookupSubTable
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, lookup_type);
     switch (lookup_type) {
     case Single:		return TRACE_RETURN (u.single.dispatch (c));
     case Multiple:		return TRACE_RETURN (u.multiple.dispatch (c));
 <at>  <at>  -1275,8 +1275,8  <at>  <at>  struct SubstLookup : Lookup
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
     unsigned int lookup_type = get_type ();
+    TRACE_DISPATCH (this, lookup_type);
     unsigned int count = get_subtable_count ();
     for (unsigned int i = 0; i < count; i++) {
       typename context_t::return_t r = get_subtable (i).dispatch (c, lookup_type);
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 7106870..0d4a10a 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
 <at>  <at>  -38,10 +38,10  <at>  <at>  namespace OT {

 

-#define TRACE_DISPATCH(this) \
+#define TRACE_DISPATCH(this, format) \
 	hb_auto_trace_t<context_t::max_debug_depth, typename context_t::return_t> trace \
 	(&c->debug_depth, c->get_name (), this, HB_FUNC, \
-	 "");
+	 "format %d", (int) format);

 #ifndef HB_DEBUG_CLOSURE
 #define HB_DEBUG_CLOSURE (HB_DEBUG+0)
 <at>  <at>  -1520,7 +1520,7  <at>  <at>  struct Context
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     case 2: return TRACE_RETURN (c->dispatch (u.format2));
 <at>  <at>  -2137,7 +2137,7  <at>  <at>  struct ChainContext
   template <typename context_t>
   inline typename context_t::return_t dispatch (context_t *c) const
   {
-    TRACE_DISPATCH (this);
+    TRACE_DISPATCH (this, u.format);
     switch (u.format) {
     case 1: return TRACE_RETURN (c->dispatch (u.format1));
     case 2: return TRACE_RETURN (c->dispatch (u.format2));
commit 5c7d6f02d71362c2b192a7d96e6181977682921c
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 20:28:49 2014 -0800

    Minor

diff --git a/src/hb-private.hh b/src/hb-private.hh
index cd02e2b..c92cdec 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
 <at>  <at>  -715,7 +715,9  <at>  <at>  _hb_debug_msg<0> (const char *what HB_UNUSED,
  */

 template <typename T>
-struct hb_printer_t {};
+struct hb_printer_t {
+  const char *print (const T&) { return "something"; }
+};

 template <>
 struct hb_printer_t<bool> {
commit 153beebba9b76901b8b62b90ba0dc69462ae2090
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 19:46:09 2014 -0800

    [ot] Make sure all toplevel tables have tableTag

diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh
index 57db59d..7500c32 100644
--- a/src/hb-open-file-private.hh
+++ b/src/hb-open-file-private.hh
 <at>  <at>  -197,6 +197,8  <at>  <at>  struct TTCHeader

 struct OpenTypeFontFile
 {
+  static const hb_tag_t tableTag	= HB_TAG ('_','_','_','_'); /* Sanitizer needs this. */
+
   static const hb_tag_t CFFTag		= HB_TAG ('O','T','T','O'); /* OpenType with Postscript outlines */
   static const hb_tag_t TrueTypeTag	= HB_TAG ( 0 , 1 , 0 , 0 ); /* OpenType with TrueType outlines */
   static const hb_tag_t TTCTag		= HB_TAG ('t','t','c','f'); /* TrueType Collection */
diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh
index 6bf6d5f..edc0e29 100644
--- a/src/hb-ot-hhea-table.hh
+++ b/src/hb-ot-hhea-table.hh
 <at>  <at>  -44,6 +44,8  <at>  <at>  namespace OT {

 struct _hea
 {
+  static const hb_tag_t tableTag = HB_TAG('_','h','e','a');
+
   static const hb_tag_t hheaTag	= HB_OT_TAG_hhea;
   static const hb_tag_t vheaTag	= HB_OT_TAG_vhea;

diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
index 932f973..317854c 100644
--- a/src/hb-ot-hmtx-table.hh
+++ b/src/hb-ot-hmtx-table.hh
 <at>  <at>  -52,6 +52,8  <at>  <at>  struct LongMetric

 struct _mtx
 {
+  static const hb_tag_t tableTag = HB_TAG('_','m','t','x');
+
   static const hb_tag_t hmtxTag	= HB_OT_TAG_hmtx;
   static const hb_tag_t vmtxTag	= HB_OT_TAG_vmtx;

commit 282b13f9b4d86b091714de7fbddc94b3e3ff3d91
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 19:32:46 2014 -0800

    [sanitize] Improve debug output some more

diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index ed64752..5616f04 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
 <at>  <at>  -217,28 +217,31  <at>  <at>  struct hb_sanitize_context_t
   inline bool check_range (const void *base, unsigned int len) const
   {
     const char *p = (const char *) base;
+    bool ok = this->start <= p && p <= this->end && (unsigned int) (this->end - p) >= len;

-    hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace
-      (&this->debug_depth, "SANITIZE", p, NULL,
-       "check_range [%p..%p] (%d bytes) in [%p..%p]",
+    DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0,
+       "check_range [%p..%p] (%d bytes) in [%p..%p] -> %s",
        p, p + len, len,
-       this->start, this->end);
+       this->start, this->end,
+       ok ? "OK" : "OUT-OF-RANGE");

-    return TRACE_RETURN (likely (this->start <= p && p <= this->end && (unsigned int) (this->end - p) >= len));
+    return likely (ok);
   }

   inline bool check_array (const void *base, unsigned int record_size, unsigned int len) const
   {
     const char *p = (const char *) base;
     bool overflows = _hb_unsigned_int_mul_overflows (len, record_size);
+    unsigned int array_size = record_size * len;
+    bool ok = !overflows && this->check_range (base, array_size);

-    hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace
-      (&this->debug_depth, "SANITIZE", p, NULL,
-       "check_array [%p..%p] (%d*%d=%ld bytes) in [%p..%p]",
-       p, p + (record_size * len), record_size, len, (unsigned long) record_size * len,
-       this->start, this->end);
+    DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0,
+       "check_array [%p..%p] (%d*%d=%d bytes) in [%p..%p] -> %s",
+       p, p + (record_size * len), record_size, len, (unsigned int) array_size,
+       this->start, this->end,
+       overflows ? "OVERFLOWS" : ok ? "OK" : "OUT-OF-RANGE");

-    return TRACE_RETURN (likely (!overflows && this->check_range (base, record_size * len)));
+    return likely (ok);
   }

   template <typename Type>
 <at>  <at>  -255,15 +258,14  <at>  <at>  struct hb_sanitize_context_t
     const char *p = (const char *) base;
     this->edit_count++;

-    hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace
-      (&this->debug_depth, "SANITIZE", p, NULL,
+    DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0,
        "may_edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s",
        this->edit_count,
        p, p + len, len,
        this->start, this->end,
        this->writable ? "GRANTED" : "DENIED");

-    return TRACE_RETURN (this->writable);
+    return this->writable;
   }

   template <typename Type, typename ValueType>
commit 0766ee1f4e6046598a2e8fb1b167c3942b4a87a0
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Fri Dec 12 18:23:20 2014 -0800

    [sanitize] Improve debug output

diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index a58e790..ed64752 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
 <at>  <at>  -197,7 +197,7  <at>  <at>  struct hb_sanitize_context_t
     this->edit_count = 0;
     this->debug_depth = 0;

-    DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, +1,
+    DEBUG_MSG_LEVEL (SANITIZE, start, 0, +1,
 		     "start [%p..%p] (%lu bytes)",
 		     this->start, this->end,
 		     (unsigned long) (this->end - this->start));
 <at>  <at>  -205,7 +205,7  <at>  <at>  struct hb_sanitize_context_t

   inline void end_processing (void)
   {
-    DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, -1,
+    DEBUG_MSG_LEVEL (SANITIZE, this->start, 0, -1,
 		     "end [%p..%p] %u edit requests",
 		     this->start, this->end, this->edit_count);

 <at>  <at>  -219,7 +219,7  <at>  <at>  struct hb_sanitize_context_t
     const char *p = (const char *) base;

     hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace
-      (&this->debug_depth, "SANITIZE", this->blob, NULL,
+      (&this->debug_depth, "SANITIZE", p, NULL,
        "check_range [%p..%p] (%d bytes) in [%p..%p]",
        p, p + len, len,
        this->start, this->end);
 <at>  <at>  -233,7 +233,7  <at>  <at>  struct hb_sanitize_context_t
     bool overflows = _hb_unsigned_int_mul_overflows (len, record_size);

     hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace
-      (&this->debug_depth, "SANITIZE", this->blob, NULL,
+      (&this->debug_depth, "SANITIZE", p, NULL,
        "check_array [%p..%p] (%d*%d=%ld bytes) in [%p..%p]",
        p, p + (record_size * len), record_size, len, (unsigned long) record_size * len,
        this->start, this->end);
 <at>  <at>  -256,7 +256,7  <at>  <at>  struct hb_sanitize_context_t
     this->edit_count++;

     hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace
-      (&this->debug_depth, "SANITIZE", this->blob, NULL,
+      (&this->debug_depth, "SANITIZE", p, NULL,
        "may_edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s",
        this->edit_count,
        p, p + len, len,
 <at>  <at>  -297,7 +297,7  <at>  <at>  struct Sanitizer
     c->init (blob);

   retry:
-    DEBUG_MSG_FUNC (SANITIZE, blob, "start");
+    DEBUG_MSG_FUNC (SANITIZE, c->start, "start");

     c->start_processing ();

 <at>  <at>  -311,13 +311,13  <at>  <at>  struct Sanitizer
     sane = t->sanitize (c);
     if (sane) {
       if (c->edit_count) {
-	DEBUG_MSG_FUNC (SANITIZE, blob, "passed first round with %d edits; going for second round", c->edit_count);
+	DEBUG_MSG_FUNC (SANITIZE, c->start, "passed first round with %d edits; going for second round", c->edit_count);

         /* sanitize again to ensure no toe-stepping */
         c->edit_count = 0;
 	sane = t->sanitize (c);
 	if (c->edit_count) {
-	  DEBUG_MSG_FUNC (SANITIZE, blob, "requested %d edits in second round; FAILLING", c->edit_count);
+	  DEBUG_MSG_FUNC (SANITIZE, c->start, "requested %d edits in second round; FAILLING", c->edit_count);
 	  sane = false;
 	}
       }
 <at>  <at>  -330,7 +330,7  <at>  <at>  struct Sanitizer
 	if (c->start) {
 	  c->writable = true;
 	  /* ok, we made it writable by relocating.  try again */
-	  DEBUG_MSG_FUNC (SANITIZE, blob, "retry");
+	  DEBUG_MSG_FUNC (SANITIZE, c->start, "retry");
 	  goto retry;
 	}
       }
 <at>  <at>  -338,7 +338,7  <at>  <at>  struct Sanitizer

     c->end_processing ();

-    DEBUG_MSG_FUNC (SANITIZE, blob, sane ? "PASSED" : "FAILED");
+    DEBUG_MSG_FUNC (SANITIZE, c->start, sane ? "PASSED" : "FAILED");
     if (sane)
       return blob;
     else {
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 10 Dec 21:07 2014

harfbuzz: Branch 'master'

 src/hb-ot-shape-complex-indic-machine.rl                                |    2 +-
 test/shaping/Makefile.am                                                |    1 +
 test/shaping/fonts/sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf |binary
 test/shaping/fonts/sha1sum/MANIFEST                                     |    1 +
 test/shaping/tests/MANIFEST                                             |    1 +
 test/shaping/tests/indic-joiner-candrabindu.tests                       |    2 ++
 6 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit e6f80fa1044243898c402ec6a59d6c1b5420be53
Author: Behdad Esfahbod <behdad <at> behdad.org>
Date:   Wed Dec 10 12:05:24 2014 -0800

    [indic] Allow ZWJ/ZWNJ before SM

    In Oriya, a ZWJ/ZWNJ might be added before candrabindu to encourage
    or stop ligation of the candrabindu.  This is clearly specified in
    the Unicode section on Oriya.  Allow it there.  Note that Uniscribe
    doesn't allow this.

    Micro tests added using Noto Sans Oriya draft.

    No changes in numbers.  Currently at:

    BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
    DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
    GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%)
    GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%)
    KANNADA: 951190 out of 951913 tests passed. 723 failed (0.0759523%)
    KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%)
    MALAYALAM: 1048147 out of 1048334 tests passed. 187 failed (0.0178378%)
    ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
    SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%)
    TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
    TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)

diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl
index f6768a5..694b235 100644
--- a/src/hb-ot-shape-complex-indic-machine.rl
+++ b/src/hb-ot-shape-complex-indic-machine.rl
 <at>  <at>  -69,7 +69,7  <at>  <at>  cn = c.ZWJ?.n?;
 forced_rakar = ZWJ H ZWJ Ra;
 symbol = Symbol.N?;
 matra_group = z{0,3}.M.N?.(H | forced_rakar)?;
-syllable_tail = (SM.SM?.ZWNJ?)? A{0,3}? VD{0,2};
+syllable_tail = (z?.SM.SM?.ZWNJ?)? A{0,3}? VD{0,2};
 place_holder = PLACEHOLDER | DOTTEDCIRCLE;
 halant_group = (z?.h.(ZWJ.N?)?);
 final_halant_group = halant_group | h.ZWNJ;
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index e2dcc98..70bcdd5 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
 <at>  <at>  -40,6 +40,7  <at>  <at>  TESTS = \
 	tests/arabic-feature-order.tests \
 	tests/context-matching.tests \
 	tests/hangul-jamo.tests \
+	tests/indic-joiner-candrabindu.tests \
 	tests/indic-old-spec.tests \
 	tests/indic-pref-blocking.tests \
 	tests/mongolian-variation-selector.tests \
diff --git a/test/shaping/fonts/sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf b/test/shaping/fonts/sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf
new file mode 100644
index 0000000..8fb2f16
Binary files /dev/null and
b/test/shaping/fonts/sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf differ
diff --git a/test/shaping/fonts/sha1sum/MANIFEST b/test/shaping/fonts/sha1sum/MANIFEST
index c51639b..924732d 100644
--- a/test/shaping/fonts/sha1sum/MANIFEST
+++ b/test/shaping/fonts/sha1sum/MANIFEST
 <at>  <at>  -2,6 +2,7  <at>  <at> 
 270b89df543a7e48e206a2d830c0e10e5265c630.ttf
 37033cc5cf37bb223d7355153016b6ccece93b28.ttf
 4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf
+5028afb650b1bb718ed2131e872fbcce57828fff.ttf
 57a9d9f83020155cbb1d2be1f43d82388cbecc88.ttf
 757ebd573617a24aa9dfbf0b885c54875c6fe06b.ttf
 7e14e7883ed152baa158b80e207b66114c823a8b.ttf
diff --git a/test/shaping/tests/MANIFEST b/test/shaping/tests/MANIFEST
index 3f2aed4..849ebc5 100644
--- a/test/shaping/tests/MANIFEST
+++ b/test/shaping/tests/MANIFEST
 <at>  <at>  -2,6 +2,7  <at>  <at>  arabic-fallback-shaping.tests
 arabic-feature-order.tests
 context-matching.tests
 hangul-jamo.tests
+indic-joiner-candrabindu.tests
 indic-old-spec.tests
 indic-pref-blocking.tests
 mongolian-variation-selector.tests
diff --git a/test/shaping/tests/indic-joiner-candrabindu.tests b/test/shaping/tests/indic-joiner-candrabindu.tests
new file mode 100644
index 0000000..351e927
--- /dev/null
+++ b/test/shaping/tests/indic-joiner-candrabindu.tests
 <at>  <at>  -0,0 +1,2  <at>  <at> 
+fonts/sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf:U+0B13,U+200D,U+0B01:[omorya=0+1450]
+fonts/sha1sum/5028afb650b1bb718ed2131e872fbcce57828fff.ttf:U+0B13,U+200C,U+0B01:[oorya=0+1309|space=1+0|candrabinduorya=1+0]
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Robin Skahjem-Eriksen | 8 Dec 21:18 2014
Picon
Picon

Re: HarfBuzz Digest, Vol 102, Issue 2

Great initiative. I am also interested in learning more about harfbuzz. With the lack of extensive
documentation, I would urge you to please document your findings in a blog or somewhere accessible.

Robin Skahjem-Eriksen

On Mon, Dec 08, 2014 at 12:00:01PM -0800, harfbuzz-request <at> lists.freedesktop.org wrote:
> Send HarfBuzz mailing list submissions to
> 	harfbuzz <at> lists.freedesktop.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> or, via email, send a message with subject or body 'help' to
> 	harfbuzz-request <at> lists.freedesktop.org
> 
> You can reach the person managing the list at
> 	harfbuzz-owner <at> lists.freedesktop.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of HarfBuzz digest..."
> 
> 
> Today's Topics:
> 
>    1. Fwd: [harfbuzz] Harfbuzz with Unity3d (#69) (Behdad Esfahbod)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sun, 07 Dec 2014 22:06:33 -0800
> From: Behdad Esfahbod <behdad <at> behdad.org>
> To: Harfbuzz <harfbuzz <at> lists.freedesktop.org>
> Cc: Abu Saad Papa <abusaadp <at> avaz.in>
> Subject: [HarfBuzz] Fwd: [harfbuzz] Harfbuzz with Unity3d (#69)
> Message-ID: <54853FE9.1060403 <at> behdad.org>
> Content-Type: text/plain; charset=utf-8
> 
> Forwarding Abu Saad's request here.  Please keep him in the CC.
> 
> 
> -------- Forwarded Message --------
> Subject: 	[harfbuzz] Harfbuzz with Unity3d (#69)
> Date: 	Sun, 07 Dec 2014 21:49:09 -0800
> From: 	abusaadp <notifications <at> github.com>
> To: 	behdad/harfbuzz <harfbuzz <at> noreply.github.com>
> 
> 
> 
> Hi,
> I would like the help of harfbuzz team to integrate harfbuzz in the unity3d
> engine so that we render indic fonts. Presently the unity3d engine does not
> render persian,arabic and indic fonts. I am not sure how to use harfbuzz in
> unity3d. Can anyone guide/help me in implementing harfbuzz in Unity3d?
> 
> Regards,
> Abu Saad Papa
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/behdad/harfbuzz/issues/69>.
> 
> 
> 
> 
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz <at> lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> 
> 
> ------------------------------
> 
> End of HarfBuzz Digest, Vol 102, Issue 2
> ****************************************
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Behdad Esfahbod | 8 Dec 07:06 2014

Fwd: [harfbuzz] Harfbuzz with Unity3d (#69)

Forwarding Abu Saad's request here.  Please keep him in the CC.

-------- Forwarded Message --------
Subject: 	[harfbuzz] Harfbuzz with Unity3d (#69)
Date: 	Sun, 07 Dec 2014 21:49:09 -0800
From: 	abusaadp <notifications <at> github.com>
To: 	behdad/harfbuzz <harfbuzz <at> noreply.github.com>

Hi,
I would like the help of harfbuzz team to integrate harfbuzz in the unity3d
engine so that we render indic fonts. Presently the unity3d engine does not
render persian,arabic and indic fonts. I am not sure how to use harfbuzz in
unity3d. Can anyone guide/help me in implementing harfbuzz in Unity3d?

Regards,
Abu Saad Papa

—
Reply to this email directly or view it on GitHub
<https://github.com/behdad/harfbuzz/issues/69>.

_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Ebrahim Byagowi | 5 Dec 07:59 2014
Picon

How to perform full precision shaping (with no scaling and grid fitting)

Hi everybody,

Follow up to this old thread, I tried the same approach and failed so I thought it worth to draw attention to it another time.

Thanks
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
Martin Hosken | 28 Nov 10:22 2014
Picon

Unsure how to use HB output to combine characters

Dear Simon,

> When I try to shape the diglyph སྐ (TIBETAN LETTER SA U+0F66, TIBETAN
> SUBJOINED LETTER KA U+0F90) in the Kokonor font I get back two glyph
> values, 118 and 160:
> 
> 1: (སྐ)
> 1: <U+0F66,U+0F90>
> 1: [118=0+1539|160=0+0]

Is it that the Kokonor font has the diacritics as overstriking, i.e. with a negative x-min (and probably
x-max too)? This would account for all the advance being on the base character and none on the diacritic.

> 
> The glyph_pos structures (using a scaled font via hb_ft_font_create) for
> each glyph look like this:
> 
> { x_advance = 375, y_advance = 0, x_offset = 0, y_offset = 0 }
> { x_advance = 0, y_advance = 0, x_offset = 0, y_offset = 0 }
> 
> That all seems fine, I think. (I'm confused why I should be advancing
> after the first glyph and then not after the combining character, but I
> don't think that's actually the problem here.)
> 
> Next I output that glyph string in my PDF document, where it looks like
> "Td[<007600a0>]TJ". (I have been spending too much time reading PDF
> documents in a text editor this week.)
> 
> What I see in my output is two separate glyphs next to each other, ས
> (TIBETAN LETTER SA U+0F66) and ྐ (TIBETAN SUBJOINED LETTER KA U+0F90)
> with the "hello I am a combining character" dotted circle around it.
> Shouldn't the combination be its own glyph in the font? How do I say in
> PDF-speak "combine these two glyphs together", or should the font be
> doing that for me?

That is very surprising, since the PDF viewer should not be doing any shaping. What is the world coming to if
we can't trust PDF viewers to put our glyphs where we tell them! Perhaps if you munge the post table to not let
on to PDF what characters the glyphs correspond to?

> What am I doing wrong?

Allowing the PDF viewer to do shaping?

GB,
Martin
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz
aron | 28 Nov 09:28 2014
Picon

question about Mongolian text render

Hi 
I use the latest version of HarfBuzz as a static library in VisualStudio,
The Mongolian string can't be rendered as I expected in my program but rendered correctly in sh-view.exe. Could anyone tell me where is wrong in my program. 

I found that the vaule -- glyph_info[i].codepoint is less than real glyph index, the difference is always 87 in my case.What is the correct way to get glyph index?

​void HBDrawText(HDC dc, int x, int y)
{
const char * fontFilePath  = "./MongolianWhite.ttf";
const wchar_t * text  = L"ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ";//Mongolian string for render


FT_Library ft_library;
FT_Face ft_face;

FT_Init_FreeType(&ft_library); /* initialize library */
FT_New_Face(ft_library, fontFilePath, 0, &ft_face); /* create face object */
FT_Set_Pixel_Sizes(ft_face, 0, 40); /* set character size */

hb_font_t * font = hb_ft_font_create(ft_face, NULL);
hb_buffer_t * buffer= hb_buffer_create();;

//
//set buffer
//
hb_buffer_add_utf16(buffer, (uint16_t *)text, lstrlen(text), 0, -1);
hb_buffer_set_direction(buffer, HB_DIRECTION_TTB); /* or LTR */
hb_buffer_set_script(buffer, HB_SCRIPT_MONGOLIAN); /* see hb-unicode.h */
hb_buffer_guess_segment_properties(buffer);
//
//
//
hb_shape(font, buffer, NULL, 0);

int glyph_count = hb_buffer_get_length(buffer);
hb_glyph_info_t * glyph_info = hb_buffer_get_glyph_infos(buffer, 0);

WCHAR dbg_info[6];
int pen_x = x;
int yBaseLine = y;
int glyphPosX = 0;
int glyphPosY = 0;

for (int i = 0; i < glyph_count; ++i) 
{
FT_UInt glyph_index  = glyph_info[i].codepoint;
FT_Load_Glyph(ft_face, glyph_index, FT_LOAD_DEFAULT);
wsprintf(dbg_info, L"%d,", glyph_index + 87);//why + 87?
OutputDebugString(dbg_info);

/* convert to an anti-aliased bitmap */
FT_Render_Glyph(ft_face->glyph, FT_RENDER_MODE_NORMAL);

FreeTypeDrawBitmap(dc, &ft_face->glyph->bitmap, pen_x + ft_face->glyph->bitmap_left,
yBaseLine - ft_face->glyph->bitmap_top);
pen_x += ft_face->glyph->advance.x >> 6;
}
hb_buffer_destroy(buffer);
hb_font_destroy(font);
FT_Done_Face(ft_face);
FT_Done_FreeType(ft_library);
}

this is the glyph index list generated by this program(incorrect).
769,660,566,487,675,490,705
hb-shape' s output(correct) is:
 [769|660|566|484|678|492|705]


--
Aron
_______________________________________________
HarfBuzz mailing list
HarfBuzz <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/harfbuzz

Gmane