[HarfBuzz] harfbuzz: Branch 'master' - 3 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Oct 11 02:17:31 UTC 2018
src/hb-aat-layout-kerx-table.hh | 17 ++++++++++++-----
src/hb-ot-shape.cc | 2 +-
2 files changed, 13 insertions(+), 6 deletions(-)
New commits:
commit 34caadc5c78e3d09faf11ef60bfade8f64f55de2
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Oct 10 22:17:07 2018 -0400
Ugh. Re-enable accidentally disabled GPOS
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index e2405237..75f72eda 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -834,7 +834,7 @@ hb_ot_position_complex (const hb_ot_shape_context_t *c)
}
if (c->plan->apply_gpos)
- ;//c->plan->position (c->font, c->buffer);
+ c->plan->position (c->font, c->buffer);
else if (c->plan->apply_kerx)
hb_aat_layout_position (c->plan, c->font, c->buffer);
commit f7c45bc33ec1559c960a039b770d5c37bd82f057
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Oct 10 22:15:13 2018 -0400
[kerx] Allow granularly disabling kerning
diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index 881ab4e3..a96bad17 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -162,6 +162,7 @@ struct KerxSubTableFormat1
return false;
}
+ hb_mask_t kern_mask = c->plan->kern_mask;
for (unsigned int i = 0; i < depth; i++)
{
/* Apparently, when spec says "Each pops one glyph from the kerning stack
@@ -170,11 +171,14 @@ struct KerxSubTableFormat1
* list. Discovered by testing. */
unsigned int idx = stack[i];
int v = *actions++;
- /* XXX Non-forward direction... */
- if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
- buffer->pos[idx].x_advance += c->font->em_scale_x (v);
- else
- buffer->pos[idx].y_advance += c->font->em_scale_y (v);
+ if (buffer->info[idx].mask & kern_mask)
+ {
+ /* XXX Non-forward direction... */
+ if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
+ buffer->pos[idx].x_advance += c->font->em_scale_x (v);
+ else
+ buffer->pos[idx].y_advance += c->font->em_scale_y (v);
+ }
}
depth = 0;
}
commit 2b72c4b63d29eea39b646c8a1a1cfc2db732e1a6
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Oct 10 21:53:14 2018 -0400
[kerx] Comment
diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index cc99868d..881ab4e3 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -123,6 +123,9 @@ struct KerxSubTableFormat1
inline driver_context_t (const KerxSubTableFormat1 *table,
hb_aat_apply_context_t *c_) :
c (c_),
+ /* Apparently the offset kernAction is from the beginning of the state-machine,
+ * similar to offsets in morx table, NOT from beginning of this table, like
+ * other subtables in kerx. Discovered via testing. */
kernAction (&table->machine + table->kernAction),
depth (0) {}
More information about the HarfBuzz
mailing list