Module: wine Branch: master Commit: 46bb89e7daeec84a9c0007f696668a0d52adc252 URL: http://source.winehq.org/git/wine.git/?a=commit;h=46bb89e7daeec84a9c0007f696...
Author: Clinton Stimpson cjstimpson@utwire.net Date: Sun Dec 24 12:47:15 2006 +0100
usp10: Implement ScriptStringGetLogicalWidths.
---
dlls/usp10/usp10.c | 33 +++++++++++++++++++++++++++++++++ dlls/usp10/usp10.spec | 2 +- 2 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 360d24e..b9a8b62 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1426,6 +1426,39 @@ HRESULT WINAPI ScriptLayout(int runs, co }
/*********************************************************************** + * 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. diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec index 83e97ba..8051da2 100644 --- a/dlls/usp10/usp10.spec +++ b/dlls/usp10/usp10.spec @@ -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)