Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dwrite/analyzer.c | 7 +++---- include/dwrite.idl | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index c2fd5c54d3..2cbac7700c 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -1178,6 +1178,9 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
method = get_number_substitutes(substitution, digits);
+ /* FIXME: have the shaping engine set this */ + memset(text_props, 0, length * sizeof(*text_props)); + for (i = 0; i < length; i++) { /* FIXME: set to better values */ glyph_props[i].justification = text[i] == ' ' ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER; @@ -1186,10 +1189,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, glyph_props[i].isZeroWidthSpace = 0; glyph_props[i].reserved = 0;
- /* FIXME: have the shaping engine set this */ - text_props[i].isShapedAlone = 0; - text_props[i].reserved = 0; - clustermap[i] = i;
string[i] = text[i]; diff --git a/include/dwrite.idl b/include/dwrite.idl index b92b1544e0..a8c523edda 100644 --- a/include/dwrite.idl +++ b/include/dwrite.idl @@ -546,7 +546,9 @@ typedef struct DWRITE_TYPOGRAPHIC_FEATURES typedef struct DWRITE_SHAPING_TEXT_PROPERTIES { UINT16 isShapedAlone : 1; - UINT16 reserved : 15; + UINT16 reserved1 : 1; + UINT16 canBreakShapingAfter : 1; + UINT16 reserved : 13; } DWRITE_SHAPING_TEXT_PROPERTIES;
typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dwrite/shape.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index e7693b58ae..0372d739b5 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -301,6 +301,17 @@ HRESULT shape_get_glyphs(struct scriptshaping_context *context, const unsigned i struct shaping_features features = { 0 }; unsigned int i;
+ if (!context->is_sideways) + { + if (context->is_rtl) + shape_add_feature(&features, DWRITE_MAKE_OPENTYPE_TAG('r','t','l','a')); + else + { + shape_add_feature(&features, DWRITE_MAKE_OPENTYPE_TAG('l','t','r','a')); + shape_add_feature(&features, DWRITE_MAKE_OPENTYPE_TAG('l','t','r','m')); + } + } + for (i = 0; i < ARRAY_SIZE(common_features); ++i) shape_add_feature(&features, common_features[i]);