[HarfBuzz] harfbuzz: Branch 'master' - 3 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Oct 10 23:13:39 UTC 2018
src/hb-aat-layout-kerx-table.hh | 4 +---
src/hb-common.cc | 2 +-
src/hb-machinery.hh | 7 +++++++
3 files changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 7ed5366d3cfca9c533250cb419e8cc878f32505d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Oct 10 19:11:30 2018 -0400
[kerx] No-op
Tested that Format0 works with Kannada MN font:
$ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2
[kn_ka=0+1000|kn_matra_uu=0 at -30,0+1345]
$ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-kern
[kn_ka=0+1030|kn_matra_uu=0+1375]
Note that GPOS does the same with 'dist' feature, and applies the whole difference to the
same glyph:
$ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2
[kn_ka=0+970|kn_matra_uu=0+1375]
$ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-dist
[kn_ka=0+1030|kn_matra_uu=0+1375]
diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index 2214265b..c683242f 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -66,9 +66,7 @@ struct KerxSubTableFormat0
{
hb_glyph_pair_t pair = {left, right};
int i = pairs.bsearch (pair);
- if (i == -1)
- return 0;
- return pairs[i].get_kerning ();
+ return i == -1 ? 0 : pairs[i].get_kerning ();
}
inline bool apply (hb_aat_apply_context_t *c) const
commit 7fa69e92ca3dd9d8fa92aba0e01098165d2b7975
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Oct 10 19:02:32 2018 -0400
Comment
diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh
index 8feb3773..56914bea 100644
--- a/src/hb-machinery.hh
+++ b/src/hb-machinery.hh
@@ -257,6 +257,13 @@ struct hb_sanitize_context_t :
inline void set_max_ops (int max_ops_) { max_ops = max_ops_; }
+ /* TODO
+ * This set_object() thing is to use sanitize at runtime lookup
+ * application time. This is very distinct from the regular
+ * sanitizer operation, so, eventually, separate into another
+ * type and make hb_aat_apply_context_t use that one instead
+ * of abusing this one.
+ */
template <typename T>
inline void set_object (const T& obj)
{
commit 7e6e5bf6147596d6d096e2ba37f3a6eefd7429cd
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Oct 10 18:59:07 2018 -0400
Fix option string matching
diff --git a/src/hb-common.cc b/src/hb-common.cc
index f698a440..eda41dd8 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -57,7 +57,7 @@ _hb_options_init (void)
p = c + strlen (c);
#define OPTION(name, symbol) \
- if (0 == strncmp (c, name, p - c)) u.opts.symbol = true;
+ if (0 == strncmp (c, name, p - c) && strlen (name) == p - c) u.opts.symbol = true;
OPTION ("uniscribe-bug-compatible", uniscribe_bug_compatible);
OPTION ("aat", aat);
More information about the HarfBuzz
mailing list