[HarfBuzz] harfbuzz: Branch 'master' - 3 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Nov 14 23:04:24 UTC 2017
src/gen-use-table.py | 4 +
src/hb-debug.hh | 12 ++-
src/hb-ot-shape-complex-use-table.cc | 34 ++++++----
src/hb-string-array.hh | 2
test/shaping/fonts/sha1sum/074a5ae6b19de8f29772fdd5df2d3d833f81f5e6.ttf |binary
test/shaping/tests/use-syllable.tests | 1
6 files changed, 34 insertions(+), 19 deletions(-)
New commits:
commit fcd6c338ff4968a0d7fc297da1c6d8058823aaa1
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 14 14:40:21 2017 -0800
Fix more compiler warnings
diff --git a/src/hb-debug.hh b/src/hb-debug.hh
index ca8c638a..03431cbf 100644
--- a/src/hb-debug.hh
+++ b/src/hb-debug.hh
@@ -221,12 +221,14 @@ template <>
template <int max_level, typename ret_t>
struct hb_auto_trace_t {
+
explicit inline hb_auto_trace_t (unsigned int *plevel_,
const char *what_,
const void *obj_,
const char *func,
const char *message,
- ...) : plevel (plevel_), what (what_), obj (obj_), returned (false)
+ ...) HB_PRINTF_FUNC(6, 7)
+ : plevel (plevel_), what (what_), obj (obj_), returned (false)
{
if (plevel) ++*plevel;
@@ -343,7 +345,7 @@ struct hb_no_trace_t {
#define TRACE_CLOSURE(this) \
hb_auto_trace_t<HB_DEBUG_CLOSURE, hb_void_t> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
- "")
+ " ")
#else
#define TRACE_CLOSURE(this) hb_no_trace_t<hb_void_t> trace HB_UNUSED
#endif
@@ -355,7 +357,7 @@ struct hb_no_trace_t {
#define TRACE_COLLECT_GLYPHS(this) \
hb_auto_trace_t<HB_DEBUG_COLLECT_GLYPHS, hb_void_t> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
- "")
+ " ")
#else
#define TRACE_COLLECT_GLYPHS(this) hb_no_trace_t<hb_void_t> trace HB_UNUSED
#endif
@@ -367,7 +369,7 @@ struct hb_no_trace_t {
#define TRACE_SANITIZE(this) \
hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace \
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
- "");
+ " ");
#else
#define TRACE_SANITIZE(this) hb_no_trace_t<bool> trace
#endif
@@ -379,7 +381,7 @@ struct hb_no_trace_t {
#define TRACE_SERIALIZE(this) \
hb_auto_trace_t<HB_DEBUG_SERIALIZE, bool> trace \
(&c->debug_depth, "SERIALIZE", c, HB_FUNC, \
- "");
+ " ");
#else
#define TRACE_SERIALIZE(this) hb_no_trace_t<bool> trace
#endif
commit 7fdf16b2ceb709b78654f99e6513fa878cd4d575
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Nov 14 14:40:11 2017 -0800
Fix compiler warning
diff --git a/src/hb-string-array.hh b/src/hb-string-array.hh
index 285b4b53..ba829b0c 100644
--- a/src/hb-string-array.hh
+++ b/src/hb-string-array.hh
@@ -48,7 +48,7 @@ static const union HB_STRING_ARRAY_TYPE_NAME {
#include HB_STRING_ARRAY_LIST
#undef _S
} st;
- char str[0];
+ char str[VAR];
}
HB_STRING_ARRAY_POOL_NAME =
{
commit 87f0ad183c489ef3208cf454d43c448638316092
Author: David Corbett <corbett.dav at husky.neu.edu>
Date: Thu Nov 2 10:59:25 2017 -0400
Allow U+20F0 in USE clusters
diff --git a/src/gen-use-table.py b/src/gen-use-table.py
index 09cc64fa..c18b1e03 100755
--- a/src/gen-use-table.py
+++ b/src/gen-use-table.py
@@ -44,6 +44,7 @@ defaults = ('Other', 'Not_Applicable', 'Cn', 'No_Block')
# TODO Characters that are not in Unicode Indic files, but used in USE
data[0][0x034F] = defaults[0]
data[0][0x2060] = defaults[0]
+data[0][0x20F0] = defaults[0]
for u in range (0xFE00, 0xFE0F + 1):
data[0][u] = defaults[0]
@@ -303,6 +304,9 @@ def map_to_use(data):
# TODO: https://github.com/behdad/harfbuzz/issues/525
if U == 0x1A7F: UISC = Consonant_Final; UIPC = Bottom
+ # TODO: https://github.com/behdad/harfbuzz/pull/609
+ if U == 0x20F0: UISC = Cantillation_Mark; UIPC = Top
+
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 1f90fc85..ab6730db 100644
--- a/src/hb-ot-shape-complex-use-table.cc
+++ b/src/hb-ot-shape-complex-use-table.cc
@@ -348,7 +348,14 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 2070 */ O, O, O, O, FM, O, O, O, O, O, O, O, O, O, O, O,
/* 2080 */ O, O, FM, FM, FM, O, O, O,
-#define use_offset_0xa800u 2616
+#define use_offset_0x20f0u 2616
+
+
+ /* Combining Diacritical Marks for Symbols */
+
+ /* 20F0 */ VMAbv, O, O, O, O, O, O, O,
+
+#define use_offset_0xa800u 2624
/* Syloti Nagri */
@@ -435,7 +442,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* AAE0 */ B, B, B, B, B, B, B, B, B, B, B, VPre, VBlw, VAbv, VPre, VPst,
/* AAF0 */ O, O, O, O, O, VMPst, H, O,
-#define use_offset_0xabc0u 3376
+#define use_offset_0xabc0u 3384
/* Meetei Mayek */
@@ -445,14 +452,14 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* ABE0 */ B, B, B, VPst, VPst, VAbv, VPst, VPst, VBlw, VPst, VPst, O, VMPst, VBlw, O, O,
/* ABF0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-#define use_offset_0xfe00u 3440
+#define use_offset_0xfe00u 3448
/* Variation Selectors */
/* FE00 */ VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS,
-#define use_offset_0x10a00u 3456
+#define use_offset_0x10a00u 3464
/* Kharoshthi */
@@ -463,7 +470,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 10A30 */ B, B, B, B, O, O, O, O, CMAbv, CMBlw, CMBlw, O, O, O, O, H,
/* 10A40 */ B, B, B, B, B, B, B, B,
-#define use_offset_0x11000u 3528
+#define use_offset_0x11000u 3536
/* Brahmi */
@@ -484,7 +491,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 110A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 110B0 */ VPst, VPre, VPst, VBlw, VBlw, VAbv, VAbv, VPst, VPst, H, CMBlw, O, O, O, O, O,
-#define use_offset_0x11100u 3720
+#define use_offset_0x11100u 3728
/* Chakma */
@@ -522,7 +529,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11220 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPst, VPst, VBlw,
/* 11230 */ VAbv, VAbv, VAbv, VAbv, VMAbv, H, CMAbv, CMAbv, O, O, O, O, O, O, VMAbv, O,
-#define use_offset_0x11280u 4040
+#define use_offset_0x11280u 4048
/* Multani */
@@ -550,7 +557,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11360 */ B, B, VPst, VPst, O, O, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O,
/* 11370 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O,
-#define use_offset_0x11400u 4288
+#define use_offset_0x11400u 4296
/* Newa */
@@ -573,7 +580,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 114C0 */ VMAbv, VMPst, H, CMBlw, B, O, O, O, O, O, O, O, O, O, O, O,
/* 114D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-#define use_offset_0x11580u 4512
+#define use_offset_0x11580u 4520
/* Siddham */
@@ -616,7 +623,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11720 */ VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VAbv, VBlw, VAbv, VAbv, VAbv, O, O, O, O,
/* 11730 */ B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, O,
-#define use_offset_0x11a00u 4960
+#define use_offset_0x11a00u 4968
/* Zanabazar Square */
@@ -635,7 +642,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11A80 */ B, B, B, B, O, O, R, R, R, R, FBlw, FBlw, FBlw, FBlw, FBlw, FBlw,
/* 11A90 */ FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, VMAbv, VMPst, CMAbv, H, O, O, O, O, O, O,
-#define use_offset_0x11c00u 5120
+#define use_offset_0x11c00u 5128
/* Bhaiksuki */
@@ -656,7 +663,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11CA0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, SUB, SUB, SUB, SUB, SUB, SUB, SUB,
/* 11CB0 */ VBlw, VPre, VBlw, VAbv, VPst, VMAbv, VMAbv, O,
-#define use_offset_0x11d00u 5304
+#define use_offset_0x11d00u 5312
/* Masaram Gondi */
@@ -668,7 +675,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11D40 */ VMAbv, VMAbv, CMBlw, VAbv, VBlw, H, R, MBlw, O, O, O, O, O, O, O, O,
/* 11D50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
-}; /* Table items: 5400; occupancy: 73% */
+}; /* Table items: 5408; occupancy: 73% */
USE_TABLE_ELEMENT_TYPE
hb_use_get_categories (hb_codepoint_t u)
@@ -694,6 +701,7 @@ hb_use_get_categories (hb_codepoint_t u)
case 0x2u:
if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u];
if (hb_in_range<hb_codepoint_t> (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u];
+ if (hb_in_range<hb_codepoint_t> (u, 0x20F0u, 0x20F7u)) return use_table[u - 0x20F0u + use_offset_0x20f0u];
if (unlikely (u == 0x25CCu)) return GB;
break;
diff --git a/test/shaping/fonts/sha1sum/074a5ae6b19de8f29772fdd5df2d3d833f81f5e6.ttf b/test/shaping/fonts/sha1sum/074a5ae6b19de8f29772fdd5df2d3d833f81f5e6.ttf
new file mode 100644
index 00000000..ad8ad840
Binary files /dev/null and b/test/shaping/fonts/sha1sum/074a5ae6b19de8f29772fdd5df2d3d833f81f5e6.ttf differ
diff --git a/test/shaping/tests/use-syllable.tests b/test/shaping/tests/use-syllable.tests
index ab050c91..e06e2fa2 100644
--- a/test/shaping/tests/use-syllable.tests
+++ b/test/shaping/tests/use-syllable.tests
@@ -2,3 +2,4 @@ fonts/sha1sum/96490dd2ff81233b335a650e7eb660e0e7b2eeea.ttf::U+AA00,U+AA2D,U+AA29
fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA34,U+AA36:[raMedial_cham_pre=0+400|a_cham=0+1121|waMedial_cham=0 at -32,0+0]
fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA35,U+AA33:[a_cham=0+1121|laMedial_cham=0 at -32,0+0|yaMedial_cham=0+542]
fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA35,U+AA36:[a_cham=0+1121|laMedial_waMedial_cham=0 at 43,0+0]
+fonts/sha1sum/074a5ae6b19de8f29772fdd5df2d3d833f81f5e6.ttf:--no-glyph-names:U+11320,U+20F0,U+11367:[3=0+502|1=0 at 33,0+0|4=0 at 300,8+0]
More information about the HarfBuzz
mailing list