Sync usp10 with Wine 1.1.35, remove diff

svn path=/trunk/; revision=44689
This commit is contained in:
Gregor Schneider 2009-12-22 00:27:48 +00:00
parent 498f09f92e
commit 4f31279e0f
3 changed files with 63 additions and 47 deletions

View file

@ -923,7 +923,9 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
TRACE("(%p)\n", pssa);
if (!pssa || !(analysis = *pssa)) return E_INVALIDARG;
invalid = analysis->invalid;
ScriptFreeCache((SCRIPT_CACHE *)&analysis->sc);
for (i = 0; i < analysis->numItems; i++)
{
@ -1298,6 +1300,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
*pcGlyphs = cChars;
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
if (!pwLogClust) return E_FAIL;
if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex)
{
@ -1318,8 +1321,6 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
for (i = 0; i < cChars; i++) pwOutGlyphs[i] = pwcChars[i];
}
if (psva)
{
/* set up a valid SCRIPT_VISATTR and LogClust for each char in this run */
for (i = 0; i < cChars; i++)
{
@ -1331,8 +1332,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
psva[i].fReserved = 0;
psva[i].fShapeReserved = 0;
if (pwLogClust) pwLogClust[i] = i;
}
pwLogClust[i] = i;
}
return S_OK;
}
@ -1369,6 +1369,7 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs,
if (!psva) return E_INVALIDARG;
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
if (!pGoffset) return E_FAIL;
if (pABC) memset(pABC, 0, sizeof(ABC));
for (i = 0; i < cGlyphs; i++)
@ -1397,7 +1398,7 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs,
pABC->abcC += abc.abcC;
}
/* FIXME: set to more reasonable values */
if (pGoffset) pGoffset[i].du = pGoffset[i].dv = 0;
pGoffset[i].du = pGoffset[i].dv = 0;
if (piAdvance) piAdvance[i] = abc.abcA + abc.abcB + abc.abcC;
}
@ -1530,6 +1531,7 @@ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, AB
TRACE("(%p, %p, 0x%04x, %p)\n", hdc, psc, glyph, abc);
if (!abc) return E_INVALIDARG;
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
if (!get_cache_glyph_widths(psc, glyph, abc))
@ -1795,8 +1797,47 @@ HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *sa, int nbchars, in
return S_OK;
}
VOID WINAPI LpkPresent()
/***********************************************************************
* ScriptApplyLogicalWidth (USP10.@)
*
* Generate glyph advance widths.
*
* PARAMS
* dx [I] Array of logical advance widths.
* num_chars [I] Number of characters.
* num_glyphs [I] Number of glyphs.
* log_clust [I] Array of logical clusters.
* sva [I] Visual attributes.
* advance [I] Array of glyph advance widths.
* sa [I] Script analysis.
* abc [I/O] Summed ABC widths.
* justify [O] Array of glyph advance widths.
*
* RETURNS
* Success: S_OK
* Failure: a non-zero HRESULT.
*/
HRESULT WINAPI ScriptApplyLogicalWidth(const int *dx, int num_chars, int num_glyphs,
const WORD *log_clust, const SCRIPT_VISATTR *sva,
const int *advance, const SCRIPT_ANALYSIS *sa,
ABC *abc, int *justify)
{
/* FIXME */
ERR("LPK: %s is unimplemented, please try again later.\n", __FUNCTION__);
int i;
FIXME("(%p, %d, %d, %p, %p, %p, %p, %p, %p)\n",
dx, num_chars, num_glyphs, log_clust, sva, advance, sa, abc, justify);
for (i = 0; i < num_chars; i++) justify[i] = advance[i];
return S_OK;
}
HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *sva, const int *advance,
int num_glyphs, int dx, int min_kashida, int *justify)
{
int i;
FIXME("(%p, %p, %d, %d, %d, %p)\n", sva, advance, num_glyphs, dx, min_kashida, justify);
for (i = 0; i < num_glyphs; i++) justify[i] = advance[i];
return S_OK;
}

View file

@ -1,6 +1,6 @@
@ stdcall LpkPresent()
@ stub LpkPresent
@ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr)
@ stub ScriptApplyLogicalWidth
@ stdcall ScriptApplyLogicalWidth(ptr long long ptr ptr ptr ptr ptr ptr)
@ stdcall ScriptBreak(ptr long ptr ptr)
@ stdcall ScriptCPtoX(long long long long ptr ptr ptr ptr ptr)
@ stdcall ScriptCacheGetHeight(ptr ptr ptr)
@ -12,7 +12,7 @@
@ stdcall ScriptGetProperties(ptr long)
@ stdcall ScriptIsComplex(wstr long long)
@ stdcall ScriptItemize(wstr long long ptr ptr ptr ptr)
@ stub ScriptJustify
@ stdcall ScriptJustify(ptr ptr long long long ptr)
@ stdcall ScriptLayout(long ptr ptr ptr)
@ stdcall ScriptPlace(ptr ptr ptr long ptr ptr ptr ptr ptr)
@ stdcall ScriptRecordDigitSubstitution(ptr ptr)

View file

@ -1,25 +0,0 @@
Index: usp10.c
===================================================================
--- usp10.c (revision 34385)
+++ usp10.c (working copy)
@@ -1726,3 +1726,10 @@
for (i = 0; i < nbchars; i++) widths[i] = glyph_width[i];
return S_OK;
}
+
+
+VOID WINAPI LpkPresent()
+{
+ /* FIXME */
+ ERR("LPK: %s is unimplemented, please try again later.\n", __FUNCTION__);
+}
Index: usp10.spec
===================================================================
--- usp10.spec (revision 34385)
+++ usp10.spec (working copy)
@@ -1,4 +1,4 @@
-@ stub LpkPresent
+@ stdcall LpkPresent()
@ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr)
@ stub ScriptApplyLogicalWidth
@ stdcall ScriptBreak(ptr long ptr ptr)