Aric Stewart : usp10: Refine Ralf reordering location for Devanagari and Gujarati.
Alexandre Julliard
julliard at winehq.org
Wed Jun 8 11:27:01 CDT 2011
Module: wine
Branch: master
Commit: 3cc612968130ab8b2a6a8336c4fd5f61fe1a8cf9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3cc612968130ab8b2a6a8336c4fd5f61fe1a8cf9
Author: Aric Stewart <aric at codeweavers.com>
Date: Wed Jun 8 07:27:13 2011 -0500
usp10: Refine Ralf reordering location for Devanagari and Gujarati.
---
dlls/usp10/shape.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index 1d25414..47700dc 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -1858,17 +1858,16 @@ static void Reorder_Ra_follows_base(LPWSTR pwChar, INT start, INT main, INT end,
}
}
-static void Reorder_Ra_follows_matra_post(LPWSTR pwChar, INT start, INT main, INT end, lexical_function lexical)
+static void Reorder_Ra_follows_matra(LPWSTR pwChar, INT start, INT main, INT end, lexical_function lexical)
{
if (start != main && end > start+1 && lexical(pwChar[start]) == lex_Ra && lexical(pwChar[start+1]) == lex_Halant)
{
int j,loc;
WORD Ra = pwChar[start];
WORD H = pwChar[start+1];
- for (loc = main; loc > end; loc++)
- if (lexical(pwChar[loc]) == lex_Matra_post)
+ for (loc = end; loc > main; loc--)
+ if (lexical(pwChar[loc]) == lex_Matra_post || lexical(pwChar[loc]) == lex_Matra_below)
break;
- if (loc == end) loc = main;
TRACE("Doing reorder of Ra to %i\n",loc);
for (j = start; j < loc-1; j++)
@@ -1958,7 +1957,7 @@ static void Reorder_Like_Devanagari(LPWSTR pwChar, INT start, INT main, INT end,
main = Indic_FindBaseConsonant(pwChar, start, main, end, lexical);
if (lexical(pwChar[main]) == lex_Vowel) return;
- Reorder_Ra_follows_matra_post(pwChar, start, main, end, lexical);
+ Reorder_Ra_follows_matra(pwChar, start, main, end, lexical);
Reorder_Matra_precede_syllable(pwChar, start, main, end, lexical);
}
@@ -1994,7 +1993,7 @@ static void Reorder_Like_Malayalam(LPWSTR pwChar, INT start, INT main, INT end,
main = Indic_FindBaseConsonant(pwChar, start, main, end, lexical);
if (lexical(pwChar[main]) == lex_Vowel) return;
- Reorder_Ra_follows_matra_post(pwChar, start, main, end, lexical);
+ Reorder_Ra_follows_matra(pwChar, start, main, end, lexical);
Reorder_Matra_precede_base(pwChar, start, main, end, lexical);
}
More information about the wine-cvs
mailing list