Reinit skippy iters when auto_zwj / auto_zwnj change

Ouch.  How did we not hit this bug before...
pull/1176/head
Behdad Esfahbod 6 years ago
parent 62d1e0852a
commit 9516cbd3df
  1. 17
      src/hb-ot-layout-gsubgpos.hh

@ -508,19 +508,20 @@ struct hb_ot_apply_context_t :
random (false), random (false),
random_state (1) {} random_state (1) {}
inline void set_lookup_mask (hb_mask_t mask) { lookup_mask = mask; } inline void reinit_iters (void)
inline void set_auto_zwj (bool auto_zwj_) { auto_zwj = auto_zwj_; }
inline void set_auto_zwnj (bool auto_zwnj_) { auto_zwnj = auto_zwnj_; }
inline void set_random (bool random_) { random = random_; }
inline void set_recurse_func (recurse_func_t func) { recurse_func = func; }
inline void set_lookup_index (unsigned int lookup_index_) { lookup_index = lookup_index_; }
inline void set_lookup_props (unsigned int lookup_props_)
{ {
lookup_props = lookup_props_;
iter_input.init (this, false); iter_input.init (this, false);
iter_context.init (this, true); iter_context.init (this, true);
} }
inline void set_lookup_mask (hb_mask_t mask) { lookup_mask = mask; }
inline void set_auto_zwj (bool auto_zwj_) { auto_zwj = auto_zwj_; reinit_iters (); }
inline void set_auto_zwnj (bool auto_zwnj_) { auto_zwnj = auto_zwnj_; reinit_iters (); }
inline void set_random (bool random_) { random = random_; }
inline void set_recurse_func (recurse_func_t func) { recurse_func = func; }
inline void set_lookup_index (unsigned int lookup_index_) { lookup_index = lookup_index_; }
inline void set_lookup_props (unsigned int lookup_props_) { lookup_props = lookup_props_; reinit_iters (); }
inline uint32_t random_number (void) inline uint32_t random_number (void)
{ {
/* http://www.cplusplus.com/reference/random/minstd_rand/ */ /* http://www.cplusplus.com/reference/random/minstd_rand/ */

Loading…
Cancel
Save