mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
usp10: Clusters are represented by glyph indices not character positions.
This commit is contained in:
parent
ab2eb34a82
commit
5e5d8d215b
@ -2534,8 +2534,9 @@ HRESULT WINAPI ScriptCPtoX(int iCP,
|
||||
|
||||
if (check >= cChars && !iMaxPos)
|
||||
{
|
||||
for (check = clust; check < cChars; check++)
|
||||
special_size += get_glyph_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, check, 1);
|
||||
int glyph;
|
||||
for (glyph = clust; glyph < cGlyphs; glyph++)
|
||||
special_size += get_glyph_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, glyph, 1);
|
||||
iSpecial = item;
|
||||
special_size /= (cChars - item);
|
||||
iPosX += special_size;
|
||||
@ -2666,8 +2667,9 @@ HRESULT WINAPI ScriptXtoCP(int iX,
|
||||
|
||||
if (check >= cChars && direction > 0)
|
||||
{
|
||||
for (check = clust; check < cChars; check++)
|
||||
special_size += get_glyph_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, check, direction);
|
||||
int glyph;
|
||||
for (glyph = clust; glyph < cGlyphs; glyph++)
|
||||
special_size += get_glyph_cluster_advance(piAdvance, psva, pwLogClust, cGlyphs, cChars, glyph, direction);
|
||||
iSpecial = item;
|
||||
special_size /= (cChars - item);
|
||||
iPosX += special_size;
|
||||
|
Loading…
Reference in New Issue
Block a user