Module: wine Branch: master Commit: 40bc04ae6196d21716db736a9ba0e5ea5a77d6df URL: http://source.winehq.org/git/wine.git/?a=commit;h=40bc04ae6196d21716db736a9b...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Oct 2 10:46:57 2017 +0300
usp10: Return whole SCRIPT_FONTPROPERTIES structure.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Aric Stewart aric@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/usp10/tests/usp10.c | 1 + dlls/usp10/usp10.c | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index cd129ff..4d8d6a7 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -2515,6 +2515,7 @@ static void test_ScriptGetFontProperties(HDC hdc) hr = ScriptGetFontProperties(hdc,&psc,&sfp); ok( hr == E_INVALIDARG, "(hdc,&psc,&sfp) invalid, expected E_INVALIDARG, got %08x\n", hr); ok( psc != NULL, "Expected a pointer in psc, got NULL\n"); + ok( sfp.cBytes == sizeof(SCRIPT_FONTPROPERTIES) - 1, "Unexpected cBytes.\n"); ScriptFreeCache(&psc); ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 40fc89a..a1f9c15 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -741,6 +741,8 @@ BOOL usp10_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T /* TODO Fix font properties on Arabic locale */ static inline BOOL set_cache_font_properties(const HDC hdc, ScriptCache *sc) { + sc->sfp.cBytes = sizeof(sc->sfp); + if (!sc->sfnt) { sc->sfp.wgBlank = sc->tm.tmBreakChar; @@ -788,11 +790,7 @@ static inline BOOL set_cache_font_properties(const HDC hdc, ScriptCache *sc)
static inline void get_cache_font_properties(SCRIPT_FONTPROPERTIES *sfp, ScriptCache *sc) { - sfp->wgBlank = sc->sfp.wgBlank; - sfp->wgDefault = sc->sfp.wgDefault; - sfp->wgInvalid = sc->sfp.wgInvalid; - sfp->wgKashida = sc->sfp.wgKashida; - sfp->iKashidaWidth = sc->sfp.iKashidaWidth; + *sfp = sc->sfp; }
static inline LONG get_cache_height(SCRIPT_CACHE *psc)