diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-11-06 11:16:45 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-11-06 12:13:20 -0500 |
commit | b0da2cd0b9c1346b7cda5997fb799e895e34aace (patch) | |
tree | c0a0e04115615446234a0e6950fd987211589614 | |
parent | 75b00b51c8fca5d605c479333eb3abd608623613 (diff) |
[kern] Some more
-rw-r--r-- | src/hb-ot-kern-table.hh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh index 2f27dcf4..e9d7e301 100644 --- a/src/hb-ot-kern-table.hh +++ b/src/hb-ot-kern-table.hh @@ -536,9 +536,6 @@ struct KernSubTableWrapper inline int get_kerning (hb_codepoint_t left, hb_codepoint_t right) const { return thiz()->subtable.get_kerning (left, right, thiz()->format); } - inline int get_h_kerning (hb_codepoint_t left, hb_codepoint_t right) const - { return is_simple () && is_horizontal () ? get_kerning (left, right) : 0; } - inline void apply (AAT::hb_aat_apply_context_t *c) const { thiz()->subtable.apply (c, thiz()->format); } @@ -567,9 +564,11 @@ struct KernTable unsigned int count = thiz()->nTables; for (unsigned int i = 0; i < count; i++) { - if (st->is_simple () && st->is_override ()) + if (!st->is_simple () || !st->is_horizontal ()) + continue; + if (st->is_override ()) v = 0; - v += st->get_h_kerning (left, right); + v += st->get_kerning (left, right); st = &StructAfter<typename T::SubTableWrapper> (*st); } return v; |