mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
Sync usp10 with Wine 1.1.35, remove diff
svn path=/trunk/; revision=44689
This commit is contained in:
parent
498f09f92e
commit
4f31279e0f
3 changed files with 63 additions and 47 deletions
|
@ -923,7 +923,9 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
|
||||||
TRACE("(%p)\n", pssa);
|
TRACE("(%p)\n", pssa);
|
||||||
|
|
||||||
if (!pssa || !(analysis = *pssa)) return E_INVALIDARG;
|
if (!pssa || !(analysis = *pssa)) return E_INVALIDARG;
|
||||||
|
|
||||||
invalid = analysis->invalid;
|
invalid = analysis->invalid;
|
||||||
|
ScriptFreeCache((SCRIPT_CACHE *)&analysis->sc);
|
||||||
|
|
||||||
for (i = 0; i < analysis->numItems; i++)
|
for (i = 0; i < analysis->numItems; i++)
|
||||||
{
|
{
|
||||||
|
@ -1298,6 +1300,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
|
||||||
|
|
||||||
*pcGlyphs = cChars;
|
*pcGlyphs = cChars;
|
||||||
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
|
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)
|
if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex)
|
||||||
{
|
{
|
||||||
|
@ -1318,21 +1321,18 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
|
||||||
for (i = 0; i < cChars; i++) pwOutGlyphs[i] = pwcChars[i];
|
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++)
|
||||||
{
|
{
|
||||||
/* set up a valid SCRIPT_VISATTR and LogClust for each char in this run */
|
/* FIXME: set to better values */
|
||||||
for (i = 0; i < cChars; i++)
|
psva[i].uJustification = (pwcChars[i] == ' ') ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER;
|
||||||
{
|
psva[i].fClusterStart = 1;
|
||||||
/* FIXME: set to better values */
|
psva[i].fDiacritic = 0;
|
||||||
psva[i].uJustification = (pwcChars[i] == ' ') ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER;
|
psva[i].fZeroWidth = 0;
|
||||||
psva[i].fClusterStart = 1;
|
psva[i].fReserved = 0;
|
||||||
psva[i].fDiacritic = 0;
|
psva[i].fShapeReserved = 0;
|
||||||
psva[i].fZeroWidth = 0;
|
|
||||||
psva[i].fReserved = 0;
|
|
||||||
psva[i].fShapeReserved = 0;
|
|
||||||
|
|
||||||
if (pwLogClust) pwLogClust[i] = i;
|
pwLogClust[i] = i;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1369,6 +1369,7 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRIPT_CACHE *psc, const WORD *pwGlyphs,
|
||||||
|
|
||||||
if (!psva) return E_INVALIDARG;
|
if (!psva) return E_INVALIDARG;
|
||||||
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
|
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
|
||||||
|
if (!pGoffset) return E_FAIL;
|
||||||
|
|
||||||
if (pABC) memset(pABC, 0, sizeof(ABC));
|
if (pABC) memset(pABC, 0, sizeof(ABC));
|
||||||
for (i = 0; i < cGlyphs; i++)
|
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;
|
pABC->abcC += abc.abcC;
|
||||||
}
|
}
|
||||||
/* FIXME: set to more reasonable values */
|
/* 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;
|
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);
|
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 ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
|
||||||
|
|
||||||
if (!get_cache_glyph_widths(psc, glyph, abc))
|
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;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID WINAPI LpkPresent()
|
/***********************************************************************
|
||||||
{
|
* ScriptApplyLogicalWidth (USP10.@)
|
||||||
/* FIXME */
|
*
|
||||||
ERR("LPK: %s is unimplemented, please try again later.\n", __FUNCTION__);
|
* 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)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@ stdcall LpkPresent()
|
@ stub LpkPresent
|
||||||
@ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr)
|
@ 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 ScriptBreak(ptr long ptr ptr)
|
||||||
@ stdcall ScriptCPtoX(long long long long ptr ptr ptr ptr ptr)
|
@ stdcall ScriptCPtoX(long long long long ptr ptr ptr ptr ptr)
|
||||||
@ stdcall ScriptCacheGetHeight(ptr ptr ptr)
|
@ stdcall ScriptCacheGetHeight(ptr ptr ptr)
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
@ stdcall ScriptGetProperties(ptr long)
|
@ stdcall ScriptGetProperties(ptr long)
|
||||||
@ stdcall ScriptIsComplex(wstr long long)
|
@ stdcall ScriptIsComplex(wstr long long)
|
||||||
@ stdcall ScriptItemize(wstr long long ptr ptr ptr ptr)
|
@ 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 ScriptLayout(long ptr ptr ptr)
|
||||||
@ stdcall ScriptPlace(ptr ptr ptr long ptr ptr ptr ptr ptr)
|
@ stdcall ScriptPlace(ptr ptr ptr long ptr ptr ptr ptr ptr)
|
||||||
@ stdcall ScriptRecordDigitSubstitution(ptr ptr)
|
@ stdcall ScriptRecordDigitSubstitution(ptr ptr)
|
||||||
|
|
|
@ -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)
|
|
Loading…
Reference in a new issue