Module: wine Branch: refs/heads/master Commit: ca55584b1967c1d36b1b59ca7aafa97bcbbe3107 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ca55584b1967c1d36b1b59ca...
Author: Jeff Latimer lats@yless4u.com.au Date: Thu Apr 13 18:38:31 2006 +1000
usp10: Add some tests to ScriptGetFontProperties.
---
dlls/usp10/usp10.c | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 030498f..b0e7ce8 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -124,10 +124,31 @@ HRESULT WINAPI ScriptGetProperties(const */ HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp) { + HDC phdc; + Scriptcache *pScriptcache; + FIXME("%p,%p,%p\n", hdc, psc, sfp); + if (!hdc && !*psc) { + TRACE("No Script_Cache (psc) and no hdc. Ask for one. Hdc=%p, psc=%p\n", hdc, *psc); + return E_PENDING; + } else + if (hdc && !*psc) { + pScriptcache = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(Scriptcache) ); + pScriptcache->hdc = (HDC) hdc; + phdc = hdc; + pScriptcache->HaveWidths = 0; + *psc = (Scriptcache *) pScriptcache; + } else + if (*psc) { + pScriptcache = (Scriptcache *) *psc; + phdc = pScriptcache->hdc; + } + + if (sfp->cBytes != sizeof(SCRIPT_FONTPROPERTIES)) + return E_INVALIDARG; + /* return something sensible? */ if (NULL != sfp) { - sfp->cBytes = sizeof(SCRIPT_FONTPROPERTIES); sfp->wgBlank = 0; sfp->wgDefault = 0; sfp->wgInvalid = 0; @@ -431,10 +452,6 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRI * ScriptGetCMap (USP10.@) * */ -/*********************************************************************** - * ScriptGetCMap (USP10.@) - * - */ HRESULT WINAPI ScriptGetCMap(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcInChars, int cChars, DWORD dwFlags, WORD *pwOutGlyphs) {