Commit 46bb89e7 authored by Clinton Stimpson's avatar Clinton Stimpson Committed by Alexandre Julliard

usp10: Implement ScriptStringGetLogicalWidths.

parent 55f385c8
......@@ -1426,6 +1426,39 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log
}
/***********************************************************************
* ScriptStringGetLogicalWidths (USP10.@)
*
* Returns logical widths from a string analysis.
*
* PARAMS
* ssa [I] string analysis.
* piDx [O] logical widths returned.
*
* RETURNS
* Success: S_OK
* Failure: a non-zero HRESULT.
*/
HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS ssa, int *piDx)
{
int i, j, next = 0;
StringAnalysis *analysis = ssa;
TRACE("%p, %p\n", ssa, piDx);
if (!analysis) return S_FALSE;
for (i = 0; i < analysis->numItems; i++)
{
for (j = 0; j < analysis->glyphs[i].numGlyphs; j++)
{
piDx[next] = analysis->glyphs[i].piAdvance[j];
next++;
}
}
return S_OK;
}
/***********************************************************************
* ScriptStringValidate (USP10.@)
*
* Validate a string analysis.
......
......@@ -20,7 +20,7 @@
@ stdcall ScriptStringAnalyse(ptr ptr long long long long long ptr ptr ptr ptr ptr ptr)
@ stdcall ScriptStringCPtoX(ptr long long ptr)
@ stdcall ScriptStringFree(ptr)
@ stub ScriptStringGetLogicalWidths
@ stdcall ScriptStringGetLogicalWidths(ptr ptr)
@ stub ScriptStringGetOrder
@ stdcall ScriptStringOut(ptr long long long ptr long long long)
@ stdcall ScriptStringValidate(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