dwrite: Propagate joiners mode to iterators.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9118160524
commit
8b419d29df
|
@ -585,6 +585,8 @@ struct scriptshaping_context
|
||||||
} user_features;
|
} user_features;
|
||||||
unsigned int global_mask;
|
unsigned int global_mask;
|
||||||
unsigned int lookup_mask; /* Currently processed feature mask, set in main loop. */
|
unsigned int lookup_mask; /* Currently processed feature mask, set in main loop. */
|
||||||
|
unsigned int auto_zwj;
|
||||||
|
unsigned int auto_zwnj;
|
||||||
struct shaping_glyph_info *glyph_infos;
|
struct shaping_glyph_info *glyph_infos;
|
||||||
|
|
||||||
unsigned int cur;
|
unsigned int cur;
|
||||||
|
|
|
@ -3587,6 +3587,8 @@ struct glyph_iterator
|
||||||
p_match_func match_func;
|
p_match_func match_func;
|
||||||
const UINT16 *glyph_data;
|
const UINT16 *glyph_data;
|
||||||
const struct match_data *match_data;
|
const struct match_data *match_data;
|
||||||
|
unsigned int ignore_zwnj;
|
||||||
|
unsigned int ignore_zwj;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void glyph_iterator_init(struct scriptshaping_context *context, unsigned int flags, unsigned int pos,
|
static void glyph_iterator_init(struct scriptshaping_context *context, unsigned int flags, unsigned int pos,
|
||||||
|
@ -3600,6 +3602,9 @@ static void glyph_iterator_init(struct scriptshaping_context *context, unsigned
|
||||||
iter->match_func = NULL;
|
iter->match_func = NULL;
|
||||||
iter->match_data = NULL;
|
iter->match_data = NULL;
|
||||||
iter->glyph_data = NULL;
|
iter->glyph_data = NULL;
|
||||||
|
/* Context matching iterators will get these fixed up. */
|
||||||
|
iter->ignore_zwnj = context->table == &context->cache->gpos;
|
||||||
|
iter->ignore_zwj = context->auto_zwj;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ot_gdef_mark_glyph_sets
|
struct ot_gdef_mark_glyph_sets
|
||||||
|
@ -4682,6 +4687,8 @@ void opentype_layout_apply_gpos_features(struct scriptshaping_context *context,
|
||||||
|
|
||||||
context->cur = 0;
|
context->cur = 0;
|
||||||
context->lookup_mask = lookup->mask;
|
context->lookup_mask = lookup->mask;
|
||||||
|
context->auto_zwnj = lookup->auto_zwnj;
|
||||||
|
context->auto_zwj = lookup->auto_zwj;
|
||||||
|
|
||||||
while (context->cur < context->glyph_count)
|
while (context->cur < context->glyph_count)
|
||||||
{
|
{
|
||||||
|
@ -5092,6 +5099,8 @@ static BOOL opentype_layout_context_match_backtrack(const struct match_context *
|
||||||
iter.match_func = mc->match_func;
|
iter.match_func = mc->match_func;
|
||||||
iter.match_data = &match_data;
|
iter.match_data = &match_data;
|
||||||
iter.glyph_data = backtrack;
|
iter.glyph_data = backtrack;
|
||||||
|
iter.ignore_zwnj |= context->auto_zwnj;
|
||||||
|
iter.ignore_zwj = 1;
|
||||||
|
|
||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
|
@ -5116,6 +5125,8 @@ static BOOL opentype_layout_context_match_lookahead(const struct match_context *
|
||||||
iter.match_func = mc->match_func;
|
iter.match_func = mc->match_func;
|
||||||
iter.match_data = &match_data;
|
iter.match_data = &match_data;
|
||||||
iter.glyph_data = lookahead;
|
iter.glyph_data = lookahead;
|
||||||
|
iter.ignore_zwnj |= context->auto_zwnj;
|
||||||
|
iter.ignore_zwj = 1;
|
||||||
|
|
||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue