Aric Stewart : usp10: Correct ralf glyph offset calculation in PostBase.
Alexandre Julliard
julliard at winehq.org
Tue Jun 21 12:25:44 CDT 2011
Module: wine
Branch: master
Commit: 3d56d674aa32e9b8f092695190315652fdb94950
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3d56d674aa32e9b8f092695190315652fdb94950
Author: Aric Stewart <aric at codeweavers.com>
Date: Tue Jun 21 10:07:53 2011 -0500
usp10: Correct ralf glyph offset calculation in PostBase.
---
dlls/usp10/shape.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index 104757c..e0b32c9 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -2096,19 +2096,21 @@ static inline INT find_halant_consonant(WCHAR* pwChars, INT index, INT end, lexi
static void Apply_Indic_PostBase(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwChars, INT cChars, IndicSyllable *syllable, WORD *pwOutGlyphs, INT* pcGlyphs, WORD *pwLogClust, lexical_function lexical, IndicSyllable *glyph_index, const char* feat)
{
INT index, nextIndex;
- INT count, g_offset;
+ INT count, g_offset=0;
+ INT ralf = syllable->ralf;
count = syllable->end - syllable->base;
- if (syllable->ralf >= syllable->base)
- g_offset = -1;
- else
- g_offset = 0;
index = find_halant_consonant(&pwChars[syllable->base], 0, count, lexical);
while (index >= 0)
{
INT prevCount = *pcGlyphs;
+ if (ralf >=0 && ralf < index)
+ {
+ g_offset--;
+ ralf = -1;
+ }
nextIndex = apply_GSUB_feature_to_glyph(hdc, psa, psc, pwOutGlyphs, index+glyph_index->base+g_offset, 1, pcGlyphs, feat);
if (nextIndex > GSUB_E_NOGLYPH)
{
More information about the wine-cvs
mailing list