[HarfBuzz] harfbuzz: Branch 'master' - 3 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Oct 31 22:54:38 UTC 2017
src/Makefile.sources | 2 -
src/hb-common.cc | 2 -
src/hb-dsalgs.hh | 14 +++++-----
src/hb-ot-post-table.hh | 2 -
src/hb-ot-shape-complex-indic.cc | 2 -
src/hb-ot-tag.cc | 2 -
src/hb-private.hh | 5 ---
test/shaping/fonts/sha1sum/b151cfcdaa77585d77f17a42158e0873fc8e2633.ttf |binary
test/shaping/tests/indic-script-extensions.tests | 1
9 files changed, 13 insertions(+), 17 deletions(-)
New commits:
commit 7ce9f397d1e5fe68c49375ad904d4fce2c7ccc0a
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Oct 31 15:34:01 2017 -0600
Rename hb-sort-r.hh -> hb-dsalgs.hh
diff --git a/src/Makefile.sources b/src/Makefile.sources
index 57875213..67a3ff6b 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -9,6 +9,7 @@ HB_BASE_sources = \
hb-buffer-serialize.cc \
hb-buffer.cc \
hb-common.cc \
+ hb-dsalgs.hh \
hb-face-private.hh \
hb-face.cc \
hb-font-private.hh \
@@ -40,7 +41,6 @@ HB_BASE_sources = \
hb-shaper-impl-private.hh \
hb-shaper-private.hh \
hb-shaper.cc \
- hb-sort-r.hh \
hb-string-array.hh \
hb-unicode-private.hh \
hb-unicode.cc \
diff --git a/src/hb-sort-r.hh b/src/hb-dsalgs.hh
similarity index 94%
rename from src/hb-sort-r.hh
rename to src/hb-dsalgs.hh
index b4c3c91d..e4138475 100644
--- a/src/hb-sort-r.hh
+++ b/src/hb-dsalgs.hh
@@ -24,17 +24,17 @@
* Google Author(s): Behdad Esfahbod
*/
-#ifndef HB_SORT_R_HH
-#define HB_SORT_R_HH
+#ifndef HB_DSALGS_HH
+#define HB_DSALGS_HH
#include "hb-private.hh"
static inline void *
-hb_bsearch_r(const void *key, const void *base,
- size_t nmemb, size_t size,
- int (*compar)(const void *_key, const void *_item, void *_arg),
- void *arg)
+hb_bsearch_r (const void *key, const void *base,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *_key, const void *_item, void *_arg),
+ void *arg)
{
int min = 0, max = (int) nmemb - 1;
while (min <= max)
@@ -158,4 +158,4 @@ static inline void hb_sort_r(void *base, size_t nel, size_t width,
sort_r_simple(base, nel, width, compar, arg);
}
-#endif /* HB_SORT_R_HH */
+#endif /* HB_DSALGS_HH */
diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh
index 580a6a92..01d626bf 100644
--- a/src/hb-ot-post-table.hh
+++ b/src/hb-ot-post-table.hh
@@ -28,7 +28,7 @@
#define HB_OT_POST_TABLE_HH
#include "hb-open-type-private.hh"
-#include "hb-sort-r.hh"
+#include "hb-dsalgs.hh"
#define HB_STRING_ARRAY_NAME format1_names
#define HB_STRING_ARRAY_LIST "hb-ot-post-macroman.hh"
commit 8eaff980fc6d15856fa853479454b58668809c7a
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Oct 31 15:30:06 2017 -0600
Remove HB_TAG_CHAR4
diff --git a/src/hb-common.cc b/src/hb-common.cc
index 2f9b3b85..5c4a2c76 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -85,7 +85,7 @@ hb_tag_from_string (const char *str, int len)
for (; i < 4; i++)
tag[i] = ' ';
- return HB_TAG_CHAR4 (tag);
+ return HB_TAG (tag[0], tag[1], tag[2], tag[3]);
}
/**
diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc
index dbec68c7..0514c41a 100644
--- a/src/hb-ot-tag.cc
+++ b/src/hb-ot-tag.cc
@@ -925,7 +925,7 @@ hb_ot_tag_from_language (hb_language_t language)
if (i) {
for (; i < 4; i++)
tag[i] = ' ';
- return HB_TAG_CHAR4 (tag);
+ return HB_TAG (tag[0], tag[1], tag[2], tag[3]);
}
}
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 6d54eef5..9acc0e79 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -646,11 +646,6 @@ static inline unsigned char TOUPPER (unsigned char c)
static inline unsigned char TOLOWER (unsigned char c)
{ return (c >= 'A' && c <= 'Z') ? c - 'A' + 'a' : c; }
-#define HB_TAG_CHAR4(s) (HB_TAG(((const char *) s)[0], \
- ((const char *) s)[1], \
- ((const char *) s)[2], \
- ((const char *) s)[3]))
-
/* C++ helpers */
commit d016c5bdb94704e726b104c318262b47c6a4b7c8
Author: David Corbett <corbett.dav at husky.neu.edu>
Date: Fri Oct 27 12:14:00 2017 -0400
Categorize Grantha candrabindu for use in Tamil
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 1937380b..0cb326aa 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -217,7 +217,7 @@ set_indic_properties (hb_glyph_info_t &info)
/* According to ScriptExtensions.txt, these Grantha marks may also be used in Tamil,
* so the Indic shaper needs to know their categories. */
- else if (unlikely (u == 0x11303u)) cat = OT_SM;
+ else if (unlikely (u == 0x11301u || u == 0x11303u)) cat = OT_SM;
else if (unlikely (u == 0x1133cu)) cat = OT_N;
else if (unlikely (u == 0x0AFBu)) cat = OT_N; /* https://github.com/behdad/harfbuzz/issues/552 */
diff --git a/test/shaping/fonts/sha1sum/b151cfcdaa77585d77f17a42158e0873fc8e2633.ttf b/test/shaping/fonts/sha1sum/b151cfcdaa77585d77f17a42158e0873fc8e2633.ttf
new file mode 100644
index 00000000..531f255f
Binary files /dev/null and b/test/shaping/fonts/sha1sum/b151cfcdaa77585d77f17a42158e0873fc8e2633.ttf differ
diff --git a/test/shaping/tests/indic-script-extensions.tests b/test/shaping/tests/indic-script-extensions.tests
index d59d79a5..2d15402e 100644
--- a/test/shaping/tests/indic-script-extensions.tests
+++ b/test/shaping/tests/indic-script-extensions.tests
@@ -1 +1,2 @@
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]
+fonts/sha1sum/b151cfcdaa77585d77f17a42158e0873fc8e2633.ttf::U+0BAA,U+11301,U+11303:[uni0BAA=0+535|u11301=0+0|u11303=0+310]
More information about the HarfBuzz
mailing list