From 9be30c83cae96a9e85e168948d13b00b6277baea Mon Sep 17 00:00:00 2001 From: Jeff Latimer Date: Thu, 20 Apr 2006 21:57:06 +1000 Subject: [PATCH] usp10: Set defaults for ScriptGetFontProperties. Set defaults similar to Win XP for Kashida and set the default char in ScriptGetFontProperties. --- dlls/usp10/usp10.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index cc8b9225242..d1be349b740 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -123,6 +123,7 @@ HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPR { HDC phdc; Scriptcache *pScriptcache; + TEXTMETRICW ptm; TRACE("%p,%p,%p\n", hdc, psc, sfp); if (!hdc && !*psc) { @@ -146,9 +147,12 @@ HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPR /* return something sensible? */ if (NULL != sfp) { sfp->wgBlank = 0; - sfp->wgDefault = 0; + if (GetTextMetricsW(phdc, &ptm)) + sfp->wgDefault = ptm.tmDefaultChar; + else + sfp->wgDefault = 0; sfp->wgInvalid = 0; - sfp->wgKashida = 1; + sfp->wgKashida = 0xffff; sfp->iKashidaWidth = 0; } return 0;