[PATCH 3/4] dwrite: Remove GetFaceNames() hack for simulated case

Nikolay Sivov nsivov at codeweavers.com
Wed Sep 2 23:36:25 CDT 2015


---

-------------- next part --------------
>From 8906d755ea607b5083aebdf0101979194fd3831d Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed, 2 Sep 2015 23:41:01 +0300
Subject: [PATCH 3/4] dwrite: Remove GetFaceNames() hack for simulated case

---
 dlls/dwrite/font.c | 40 +---------------------------------------
 1 file changed, 1 insertion(+), 39 deletions(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 3daab79..0970f3a 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1240,47 +1240,9 @@ static BOOL WINAPI dwritefont_IsSymbolFont(IDWriteFont2 *iface)
 
 static HRESULT WINAPI dwritefont_GetFaceNames(IDWriteFont2 *iface, IDWriteLocalizedStrings **names)
 {
-    static const WCHAR boldobliqueW[] = {'B','o','l','d',' ','O','b','l','i','q','u','e',0};
-
     struct dwrite_font *This = impl_from_IDWriteFont2(iface);
-    IDWriteLocalizedStrings *strings;
-    const WCHAR *name;
-    HRESULT hr;
-
     TRACE("(%p)->(%p)\n", This, names);
-
-    *names = NULL;
-
-    if (This->data->simulations == DWRITE_FONT_SIMULATIONS_NONE)
-        return clone_localizedstring(This->data->names, names);
-
-    switch (This->data->simulations) {
-    case DWRITE_FONT_SIMULATIONS_BOLD|DWRITE_FONT_SIMULATIONS_OBLIQUE:
-        name = boldobliqueW;
-        break;
-    case DWRITE_FONT_SIMULATIONS_BOLD:
-        name = boldW;
-        break;
-    case DWRITE_FONT_SIMULATIONS_OBLIQUE:
-        name = obliqueW;
-        break;
-    default:
-        ERR("unknown simulations %d\n", This->data->simulations);
-        return E_FAIL;
-    }
-
-    hr = create_localizedstrings(&strings);
-    if (FAILED(hr)) return hr;
-
-    hr = add_localizedstring(strings, enusW, name);
-    if (FAILED(hr)) {
-        IDWriteLocalizedStrings_Release(strings);
-        return hr;
-    }
-
-    *names = strings;
-
-    return S_OK;
+    return clone_localizedstring(This->data->names, names);
 }
 
 static HRESULT WINAPI dwritefont_GetInformationalStrings(IDWriteFont2 *iface,
-- 
2.1.4



More information about the wine-patches mailing list