Reinit skippy iters when auto_zwj / auto_zwnj change

Ouch.  How did we not hit this bug before...
This commit is contained in:
Behdad Esfahbod 2018-09-23 22:00:34 -04:00
parent 62d1e0852a
commit 9516cbd3df
1 changed files with 9 additions and 8 deletions

View File

@ -508,19 +508,20 @@ struct hb_ot_apply_context_t :
random (false),
random_state (1) {}
inline void set_lookup_mask (hb_mask_t mask) { lookup_mask = mask; }
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_)
inline void reinit_iters (void)
{
lookup_props = lookup_props_;
iter_input.init (this, false);
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)
{
/* http://www.cplusplus.com/reference/random/minstd_rand/ */