usp10: Implement ScriptStringGetLogicalWidths.

This commit is contained in:
Clinton Stimpson 2006-12-24 12:47:15 +01:00 committed by Alexandre Julliard
parent 55f385c8d7
commit 46bb89e7da
2 changed files with 34 additions and 1 deletions

View File

@ -1425,6 +1425,39 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log
return S_OK;
}
/***********************************************************************
* 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.@)
*

View File

@ -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)