Nikolay Sivov : dwrite: Remove special case for vertical variants.

Alexandre Julliard julliard at winehq.org
Fri Jan 25 16:29:08 CST 2019


Module: wine
Branch: master
Commit: 27aef423d834b5f93c16a821e03db6d4a0973008
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=27aef423d834b5f93c16a821e03db6d4a0973008

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Jan 25 14:56:39 2019 +0300

dwrite: Remove special case for vertical variants.

This should be implemented as a part of shaping pass.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/analyzer.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index 69e6b11..a1d9f25 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -1161,9 +1161,8 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
     DWRITE_NUMBER_SUBSTITUTION_METHOD method;
     struct scriptshaping_context context;
     struct scriptshaping_cache *cache = NULL;
-    BOOL update_cluster, need_vertical;
     WCHAR digits[NATIVE_DIGITS_LEN];
-    IDWriteFontFace1 *fontface1;
+    BOOL update_cluster;
     WCHAR *string;
     UINT32 i, g;
     HRESULT hr = S_OK;
@@ -1225,12 +1224,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
         glyph_props[i].reserved = 0;
     }
 
-    hr = IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1);
-    if (FAILED(hr))
-        WARN("failed to get IDWriteFontFace1\n");
-
-    need_vertical = is_sideways && fontface1 && IDWriteFontFace1_HasVerticalGlyphVariants(fontface1);
-
     for (i = 0, g = 0, update_cluster = FALSE; i < length; i++) {
         UINT32 codepoint;
 
@@ -1245,14 +1238,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
             if (FAILED(hr))
                 goto done;
 
-            if (need_vertical) {
-                UINT16 vertical;
-
-                hr = IDWriteFontFace1_GetVerticalGlyphVariants(fontface1, 1, &glyph_indices[g], &vertical);
-                if (hr == S_OK)
-                    glyph_indices[g] = vertical;
-            }
-
             g++;
         }
         else {
@@ -1294,8 +1279,6 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface,
         hr = default_shaping_ops.set_text_glyphs_props(&context, clustermap, glyph_indices, *actual_glyph_count, text_props, glyph_props);
 
 done:
-    if (fontface1)
-        IDWriteFontFace1_Release(fontface1);
     release_scriptshaping_cache(cache);
     heap_free(string);
 




More information about the wine-cvs mailing list