Minor
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 11 Oct 2018 17:24:17 +0000 (13:24 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 11 Oct 2018 17:24:17 +0000 (13:24 -0400)
src/hb-ot-shape.cc
src/hb-ot-shape.hh

index 3ca54ac..2b147e3 100644 (file)
@@ -116,6 +116,9 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
   plan.has_gpos_mark = !!plan.map.get_1_mask (HB_TAG ('m','a','r','k'));
   if (!plan.apply_gpos && !plan.apply_kerx)
     plan.fallback_mark_positioning = true;
+
+  /* Currently we always apply trak. */
+  plan.apply_trak = hb_aat_layout_has_tracking (face);
 }
 
 
@@ -838,7 +841,8 @@ hb_ot_position_complex (const hb_ot_shape_context_t *c)
   else if (c->plan->apply_kerx)
     hb_aat_layout_position (c->plan, c->font, c->buffer);
 
-  hb_aat_layout_track (c->plan, c->font, c->buffer);
+  if (c->plan->apply_trak)
+    hb_aat_layout_track (c->plan, c->font, c->buffer);
 
   if (!c->plan->apply_kerx)
     switch (c->plan->shaper->zero_width_marks)
index 4943c51..c9c0d3e 100644 (file)
@@ -50,10 +50,11 @@ struct hb_ot_shape_plan_t
   bool fallback_kerning : 1;
   bool fallback_mark_positioning : 1;
 
-  bool apply_morx : 1;
+  bool apply_gpos : 1;
   bool apply_kerx : 1;
   bool apply_kern : 1;
-  bool apply_gpos : 1;
+  bool apply_morx : 1;
+  bool apply_trak : 1;
 
 
   inline void collect_lookups (hb_tag_t table_tag, hb_set_t *lookups) const