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

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Oct 2 16:27:19 UTC 2017


 src/gen-use-table.py                 |    3 +++
 src/hb-common.h                      |   14 --------------
 src/hb-ot-shape-complex-private.hh   |   12 ++++++++----
 src/hb-ot-shape-complex-use-table.cc |    2 +-
 src/hb-ucdn/README                   |    6 +++---
 src/hb-ucdn/ucdn.h                   |   14 --------------
 6 files changed, 15 insertions(+), 36 deletions(-)

New commits:
commit cbec0cd65e1787b20ea55dd5583a7444938bd381
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Oct 2 18:26:52 2017 +0200

    Remove some really old cruft

diff --git a/src/hb-common.h b/src/hb-common.h
index 8614ee3f..614a63aa 100644
--- a/src/hb-common.h
+++ b/src/hb-common.h
@@ -43,30 +43,16 @@
 # endif /* !__cplusplus */
 #endif
 
-#if !defined (HB_DONT_DEFINE_STDINT)
-
 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \
     defined (_sgi) || defined (__sun) || defined (sun) || \
     defined (__digital__) || defined (__HP_cc)
 #  include <inttypes.h>
 #elif defined (_AIX)
 #  include <sys/inttypes.h>
-/* VS 2010 (_MSC_VER 1600) has stdint.h */
-#elif defined (_MSC_VER) && _MSC_VER < 1600
-typedef __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
 #else
 #  include <stdint.h>
 #endif
 
-#endif
-
 HB_BEGIN_DECLS
 
 
diff --git a/src/hb-ucdn/ucdn.h b/src/hb-ucdn/ucdn.h
index 71a1e4b3..2d5fc359 100644
--- a/src/hb-ucdn/ucdn.h
+++ b/src/hb-ucdn/ucdn.h
@@ -36,30 +36,16 @@
 
 HB_BEGIN_HEADER
 
-#if !defined (HB_DONT_DEFINE_STDINT)
-
 #if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \
     defined (_sgi) || defined (__sun) || defined (sun) || \
     defined (__digital__) || defined (__HP_cc)
 #  include <inttypes.h>
 #elif defined (_AIX)
 #  include <sys/inttypes.h>
-/* VS 2010 (_MSC_VER 1600) has stdint.h */
-#elif defined (_MSC_VER) && _MSC_VER < 1600
-typedef __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
 #else
 #  include <stdint.h>
 #endif
 
-#endif
-
 
 #define UCDN_EAST_ASIAN_F 0
 #define UCDN_EAST_ASIAN_H 1
commit b3dff7720c1fac8ca9bdd7087ac368a0af4349e8
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Oct 2 18:22:51 2017 +0200

    [ucdn] Update README

diff --git a/src/hb-ucdn/README b/src/hb-ucdn/README
index fcb97b9a..2203ae69 100644
--- a/src/hb-ucdn/README
+++ b/src/hb-ucdn/README
@@ -31,10 +31,10 @@ UCDN was written by Grigori Goronzy <greg at kinoho.net>.
 
 How to Use
 
-Include ucdn.c, ucdn.h and unicodedata_db.h in your project. Now,
-just use the functions as documented in ucdn.h.
+Include ucdn.c, ucdn.h and ucdn_db.h in your project. Now, just use the
+functions as documented in ucdn.h.
 
 In some cases, it might be necessary to regenerate the Unicode
 database file. The script makeunicodedata.py (Python 3.x required)
 fetches the appropriate files and dumps the compressed database into
-unicodedata_db.h.
+ucdn_db.h.
commit 57c55ef8341c760145170dedd002c5afb380e6c8
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Oct 2 18:21:27 2017 +0200

    [ot] Improve shaper selection heuristic

diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh
index 20ad6b2c..8fadd7cd 100644
--- a/src/hb-ot-shape-complex-private.hh
+++ b/src/hb-ot-shape-complex-private.hh
@@ -253,10 +253,12 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
     case HB_SCRIPT_SINHALA:
 
       /* If the designer designed the font for the 'DFLT' script,
-       * use the default shaper.  Otherwise, use the specific shaper.
+       * (or we ended up arbitrarily pick 'latn'), use the default shaper.
+       * Otherwise, use the specific shaper.
        * Note that for some simple scripts, there may not be *any*
        * GSUB/GPOS needed, so there may be no scripts found! */
-      if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
+      if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') ||
+	  planner->map.chosen_script[0] == HB_TAG ('l','a','t','n'))
 	return &_hb_ot_complex_shaper_default;
       else
 	return &_hb_ot_complex_shaper_indic;
@@ -368,10 +370,12 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
     case HB_SCRIPT_ZANABAZAR_SQUARE:
 
       /* If the designer designed the font for the 'DFLT' script,
-       * use the default shaper.  Otherwise, use the specific shaper.
+       * (or we ended up arbitrarily pick 'latn'), use the default shaper.
+       * Otherwise, use the specific shaper.
        * Note that for some simple scripts, there may not be *any*
        * GSUB/GPOS needed, so there may be no scripts found! */
-      if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
+      if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') ||
+	  planner->map.chosen_script[0] == HB_TAG ('l','a','t','n'))
 	return &_hb_ot_complex_shaper_default;
       else
 	return &_hb_ot_complex_shaper_use;
commit 5680ef884cf31ab9b42c587ffa260e390c88b8eb
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Oct 2 18:20:51 2017 +0200

    [use] Hack to fix shaping of U+1A7F
    
    Fixes https://github.com/behdad/harfbuzz/issues/525

diff --git a/src/gen-use-table.py b/src/gen-use-table.py
index b283c521..4f482612 100755
--- a/src/gen-use-table.py
+++ b/src/gen-use-table.py
@@ -299,6 +299,9 @@ def map_to_use(data):
 		# the nasalization marks, maybe only for U+1CE9..U+1CF1.
 		if U == 0x1CED: UISC = Tone_Mark
 
+		# TODO: https://github.com/behdad/harfbuzz/issues/525
+		if U == 0x1A7F: UISC = Consonant_Final; UIPC = Bottom
+
 		values = [k for k,v in items if v(U,UISC,UGC)]
 		assert len(values) == 1, "%s %s %s %s" % (hex(U), UISC, UGC, values)
 		USE = values[0]
diff --git a/src/hb-ot-shape-complex-use-table.cc b/src/hb-ot-shape-complex-use-table.cc
index f924ac05..daae04ed 100644
--- a/src/hb-ot-shape-complex-use-table.cc
+++ b/src/hb-ot-shape-complex-use-table.cc
@@ -276,7 +276,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
   /* 1A40 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,
   /* 1A50 */     B,     B,     B,     B,     B,  MPre,  MBlw,   SUB,  FAbv,  FAbv,  FAbv,   SUB,   SUB,   SUB,   SUB,     O,
   /* 1A60 */     H,  VPst,  VAbv,  VPst,  VPst,  VAbv,  VAbv,  VAbv,  VAbv,  VBlw,  VBlw,  VAbv,  VBlw,  VPst,  VPre,  VPre,
-  /* 1A70 */  VPre,  VPre,  VPre,  VAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,  VAbv,    FM,    FM,     O,     O,    FM,
+  /* 1A70 */  VPre,  VPre,  VPre,  VAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv,  VAbv,    FM,    FM,     O,     O,  FBlw,
   /* 1A80 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
   /* 1A90 */     B,     B,     B,     B,     B,     B,     B,     B,     B,     B,     O,     O,     O,     O,     O,     O,
 


More information about the HarfBuzz mailing list