Nikolay Sivov : dwrite: Update glyph component count on multiple substitution.
Alexandre Julliard
julliard at winehq.org
Thu May 28 17:11:09 CDT 2020
Module: wine
Branch: master
Commit: 2e4d71c7218d139476c5ef84129a54c9209cea8b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2e4d71c7218d139476c5ef84129a54c9209cea8b
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu May 28 14:54:28 2020 +0300
dwrite: Update glyph component count on multiple substitution.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dwrite/dwrite_private.h | 13 ++++++++++++-
dlls/dwrite/opentype.c | 10 +++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h
index 2ed53658cd..94705b0d63 100644
--- a/dlls/dwrite/dwrite_private.h
+++ b/dlls/dwrite/dwrite_private.h
@@ -468,6 +468,17 @@ struct shaping_glyph_info
unsigned int props;
};
+struct shaping_glyph_properties
+{
+ UINT16 justification : 4;
+ UINT16 isClusterStart : 1;
+ UINT16 isDiacritic : 1;
+ UINT16 isZeroWidthSpace : 1;
+ UINT16 reserved : 1;
+ UINT16 components : 4;
+ UINT16 reserved2 : 4;
+};
+
struct scriptshaping_context
{
struct scriptshaping_cache *cache;
@@ -498,7 +509,7 @@ struct scriptshaping_context
struct
{
UINT16 *glyphs;
- DWRITE_SHAPING_GLYPH_PROPERTIES *glyph_props;
+ struct shaping_glyph_properties *glyph_props;
UINT16 *clustermap;
} buffer;
} u;
diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c
index e31057710b..92061cbf5c 100644
--- a/dlls/dwrite/opentype.c
+++ b/dlls/dwrite/opentype.c
@@ -4648,7 +4648,10 @@ static BOOL opentype_layout_apply_gsub_mult_substitution(struct scriptshaping_co
glyph = GET_BE_WORD(glyphs[i]);
context->u.subst.glyphs[idx + i] = glyph;
if (i)
+ {
context->u.subst.glyph_props[idx + i].isClusterStart = 0;
+ context->u.buffer.glyph_props[idx + i].components = 0;
+ }
opentype_set_subst_glyph_props(context, idx + i, glyph);
/* Inherit feature mask from original matched glyph. */
context->glyph_infos[idx + i].mask = mask;
@@ -5081,11 +5084,12 @@ static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, c
codepoint = context->u.subst.digits[codepoint - '0'];
context->u.subst.glyphs[g] = font->get_glyph(context->cache->context, codepoint);
- context->u.subst.glyph_props[g].justification = SCRIPT_JUSTIFY_CHARACTER;
- context->u.subst.glyph_props[g].isClusterStart = 1;
+ context->u.buffer.glyph_props[g].justification = SCRIPT_JUSTIFY_CHARACTER;
+ context->u.buffer.glyph_props[g].isClusterStart = 1;
opentype_set_subst_glyph_props(context, g, context->u.subst.glyphs[g]);
if (opentype_is_default_ignorable(codepoint))
- context->u.subst.glyph_props[g].isZeroWidthSpace = 1;
+ context->u.buffer.glyph_props[g].isZeroWidthSpace = 1;
+ context->u.buffer.glyph_props[g].components = 1;
context->glyph_count++;
clustermap[i] = i;
More information about the wine-cvs
mailing list