Commit 40bc04ae authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

usp10: Return whole SCRIPT_FONTPROPERTIES structure.

parent 68c9ac60
...@@ -2515,6 +2515,7 @@ static void test_ScriptGetFontProperties(HDC hdc) ...@@ -2515,6 +2515,7 @@ static void test_ScriptGetFontProperties(HDC hdc)
hr = ScriptGetFontProperties(hdc,&psc,&sfp); hr = ScriptGetFontProperties(hdc,&psc,&sfp);
ok( hr == E_INVALIDARG, "(hdc,&psc,&sfp) invalid, expected E_INVALIDARG, got %08x\n", hr); 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( psc != NULL, "Expected a pointer in psc, got NULL\n");
ok( sfp.cBytes == sizeof(SCRIPT_FONTPROPERTIES) - 1, "Unexpected cBytes.\n");
ScriptFreeCache(&psc); ScriptFreeCache(&psc);
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
......
...@@ -741,6 +741,8 @@ BOOL usp10_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T ...@@ -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 */ /* TODO Fix font properties on Arabic locale */
static inline BOOL set_cache_font_properties(const HDC hdc, ScriptCache *sc) static inline BOOL set_cache_font_properties(const HDC hdc, ScriptCache *sc)
{ {
sc->sfp.cBytes = sizeof(sc->sfp);
if (!sc->sfnt) if (!sc->sfnt)
{ {
sc->sfp.wgBlank = sc->tm.tmBreakChar; sc->sfp.wgBlank = sc->tm.tmBreakChar;
...@@ -788,11 +790,7 @@ static inline BOOL set_cache_font_properties(const HDC hdc, ScriptCache *sc) ...@@ -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) static inline void get_cache_font_properties(SCRIPT_FONTPROPERTIES *sfp, ScriptCache *sc)
{ {
sfp->wgBlank = sc->sfp.wgBlank; *sfp = sc->sfp;
sfp->wgDefault = sc->sfp.wgDefault;
sfp->wgInvalid = sc->sfp.wgInvalid;
sfp->wgKashida = sc->sfp.wgKashida;
sfp->iKashidaWidth = sc->sfp.iKashidaWidth;
} }
static inline LONG get_cache_height(SCRIPT_CACHE *psc) static inline LONG get_cache_height(SCRIPT_CACHE *psc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment