Commit 401e32ee authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

usp10: Implement and test ScriptCacheGetHeight.

parent e8617b9f
......@@ -652,3 +652,48 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
return hr;
}
}
/***********************************************************************
* ScriptCacheGetHeight (USP10.@)
*
* Retrieve the height of the font in the cache.
*
* PARAMS
* hdc [I] Device context.
* psc [I/O] Opaque pointer to a script cache.
* height [O] Receives font height.
*
* RETURNS
* Success: S_OK
* Failure: Non-zero HRESULT value.
*/
HRESULT WINAPI ScriptCacheGetHeight(HDC hdc, SCRIPT_CACHE *psc, long *height)
{
HDC phdc;
Scriptcache *pScriptcache;
TEXTMETRICW metric;
TRACE("(%p, %p, %p)\n", hdc, psc, height);
if (!psc || !height)
return E_INVALIDARG;
if (!hdc) return E_PENDING;
if (!*psc) {
pScriptcache = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(Scriptcache));
pScriptcache->hdc = hdc;
phdc = hdc;
*psc = pScriptcache;
} else {
pScriptcache = *psc;
phdc = pScriptcache->hdc;
}
/* FIXME: get this from the cache */
if (!GetTextMetricsW(phdc, &metric))
return E_INVALIDARG;
*height = metric.tmHeight;
return S_OK;
}
......@@ -3,7 +3,7 @@
@ stub ScriptApplyLogicalWidth
@ stdcall ScriptBreak(ptr long ptr ptr)
@ stdcall ScriptCPtoX(long long long long ptr ptr ptr ptr ptr)
@ stub ScriptCacheGetHeight
@ stdcall ScriptCacheGetHeight(ptr ptr ptr)
@ stdcall ScriptFreeCache(ptr)
@ stdcall ScriptGetCMap(ptr ptr ptr long long ptr)
@ stdcall ScriptGetFontProperties(long ptr ptr)
......
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