Module: wine Branch: master Commit: 342de4c1288e1b80fe3e3970d4c0d4d76b2abd26 URL: http://source.winehq.org/git/wine.git/?a=commit;h=342de4c1288e1b80fe3e3970d4...
Author: Aric Stewart aric@codeweavers.com Date: Mon May 23 11:41:35 2011 -0500
usp10: Update LogClust from glyph properties.
---
dlls/usp10/shape.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index debd242..c2cbfbf 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -1026,6 +1026,30 @@ static void GDEF_UpdateGlyphProps(HDC hdc, const WORD *pwGlyphs, const WORD cGly } }
+static void UpdateClustersFromGlyphProp(const int cGlyphs, const int cChars, WORD* pwLogClust, SCRIPT_GLYPHPROP *pGlyphProp) +{ + int i; + + for (i = 0; i < cGlyphs; i++) + { + if (!pGlyphProp[i].sva.fClusterStart) + { + int j; + for (j = 0; j < cChars; j++) + { + if (pwLogClust[j] == i) + { + int k = j; + while (!pGlyphProp[pwLogClust[k]].sva.fClusterStart && k >= 0 && k <cChars) + k-=1; + if (pGlyphProp[pwLogClust[k]].sva.fClusterStart) + pwLogClust[j] = pwLogClust[k]; + } + } + } + } +} + static void UpdateClusters(int nextIndex, int changeCount, int write_dir, int chars, WORD* pwLogClust ) { if (changeCount == 0) @@ -1485,6 +1509,7 @@ static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYS }
GDEF_UpdateGlyphProps(hdc, pwGlyphs, cGlyphs, pwLogClust, pGlyphProp); + UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); }
void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp)