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

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Oct 25 23:23:30 UTC 2017


 test/shaping/Makefile.am                         |    1 
 test/shaping/hb_test_tools.py                    |   27 ++++++++++++++++++++++-
 test/shaping/record-test.sh                      |    2 -
 test/shaping/tests/indic-script-extensions.tests |    2 -
 4 files changed, 29 insertions(+), 3 deletions(-)

New commits:
commit bf133497e53e8b1dcd22df62080d33e7f3d85b68
Merge: fd786c76 49a41dc7
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Oct 25 17:23:20 2017 -0600

    Merge commit '49a41dc75931cc2d2f7e74b7801f8cc327039e8e'

commit fd786c768f838ab61090004dd46b8cefeb270dfd
Author: David Corbett <corbett.dav at husky.neu.edu>
Date:   Wed Oct 25 14:31:22 2017 -0400

    Use `mktemp -d` instead of `mktemp --directory`

diff --git a/test/shaping/record-test.sh b/test/shaping/record-test.sh
index 0259c76a..d7c0d6d5 100755
--- a/test/shaping/record-test.sh
+++ b/test/shaping/record-test.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-dir=`mktemp --directory`
+dir=`mktemp -d`
 
 hb_shape=$1
 shift
commit c4944920c0c11d6424d600ebc9130c9055382f80
Author: David Corbett <corbett.dav at husky.neu.edu>
Date:   Wed Oct 25 16:06:40 2017 -0400

    Fix and run indic-script-extensions.tests

diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index f788d42b..377c08d0 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
@@ -61,6 +61,7 @@ TESTS = \
 	tests/indic-joiners.tests \
 	tests/indic-old-spec.tests \
 	tests/indic-pref-blocking.tests \
+	tests/indic-script-extensions.tests \
 	tests/indic-special-cases.tests \
 	tests/indic-syllable.tests \
 	tests/language-tags.tests \
diff --git a/test/shaping/tests/indic-script-extensions.tests b/test/shaping/tests/indic-script-extensions.tests
index 52b6aa0d..d59d79a5 100644
--- a/test/shaping/tests/indic-script-extensions.tests
+++ b/test/shaping/tests/indic-script-extensions.tests
@@ -1 +1 @@
-fonts/sha1sum/3493e92eaded2661cadde752a39f9d58b11f0326.ttf::U+0BA4,U+0BC6,U+D804,U+DF3C,U+0BAA,U+D804,U+DF3C,U+0BC6,U+D804,U+DF3C:[u0BC6=0+2093|u1133C=0+0|u0BA4=0+1863|u0BC6=3+2093|u1133C=3+0|u0BAA=3+1706|u1133C=3+0]
+fonts/sha1sum/3493e92eaded2661cadde752a39f9d58b11f0326.ttf::U+0BA4,U+0BC6,U+1133C,U+0BAA,U+1133C,U+0BC6,U+1133C:[u0BC6=0+2093|u1133C=0+0|u0BA4=0+1863|u0BC6=3+2093|u1133C=3+0|u0BAA=3+1706|u1133C=3+0]
commit d8df714251c61e13d7d12eb3f7393dd3a75a3719
Author: David Corbett <corbett.dav at husky.neu.edu>
Date:   Wed Oct 25 16:06:01 2017 -0400

    Fix code point iteration in narrow Python

diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py
index b9cb836a..c9bb1dd3 100644
--- a/test/shaping/hb_test_tools.py
+++ b/test/shaping/hb_test_tools.py
@@ -7,6 +7,9 @@ from itertools import *
 diff_symbols = "-+=*&^%$#@!~/"
 diff_colors = ['red', 'green', 'blue']
 
+def codepoints(s):
+	return (ord (u) for u in s)
+
 try:
 	unichr = unichr
 
@@ -43,6 +46,28 @@ try:
 				except UnicodeDecodeError:
 					raise ValueError('unichr() arg not in range(0x110000)')
 
+		def codepoints(s):
+			high_surrogate = None
+			for u in s:
+				cp = ord (u)
+				if 0xDC00 <= cp <= 0xDFFF:
+					if high_surrogate:
+						yield 0x10000 + (high_surrogate - 0xD800) * 0x400 + (cp - 0xDC00)
+						high_surrogate = None
+					else:
+						yield 0xFFFC
+				else:
+					if high_surrogate:
+						yield 0xFFFC
+						high_surrogate = None
+					if 0xD800 <= cp <= 0xDBFF:
+						high_surrogate = cp
+					else:
+						yield cp
+						high_surrogate = None
+			if high_surrogate:
+				yield 0xFFFC
+
 except NameError:
 	unichr = chr
 
@@ -456,7 +481,7 @@ class Unicode:
 
 	@staticmethod
 	def decode (s):
-		return u','.join ("U+%04X" % ord (u) for u in tounicode (s, 'utf-8'))
+		return u','.join ("U+%04X" % cp for cp in codepoints (tounicode (s, 'utf-8')))
 
 	@staticmethod
 	def parse (s):


More information about the HarfBuzz mailing list