Aric Stewart : usp10: Devanagari danda and double danda are used for all Indic scripts.
Alexandre Julliard
julliard at winehq.org
Tue Nov 15 13:17:31 CST 2011
Module: wine
Branch: master
Commit: e5d33f08c7282935c2c5315b1fa8eb154eedbf0b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e5d33f08c7282935c2c5315b1fa8eb154eedbf0b
Author: Aric Stewart <aric at codeweavers.com>
Date: Tue Nov 15 11:02:31 2011 -0700
usp10: Devanagari danda and double danda are used for all Indic scripts.
---
dlls/usp10/usp10.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 50e8471..94c49fe 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -772,6 +772,11 @@ HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE *sds,
}
}
+static inline BOOL is_indic(WORD script)
+{
+ return (script >= Script_Devanagari && script <= Script_Malayalam_Numeric);
+}
+
/***********************************************************************
* ScriptItemizeOpenType (USP10.@)
*
@@ -808,6 +813,7 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int
WORD *scripts = NULL;
WORD baselevel = 0;
BOOL new_run;
+ WORD last_indic = -1;
TRACE("%s,%d,%d,%p,%p,%p,%p\n", debugstr_wn(pwcInChars, cInChars), cInChars, cMaxItems,
psControl, psState, pItems, pcItems);
@@ -820,7 +826,15 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int
return E_OUTOFMEMORY;
for (i = 0; i < cInChars; i++)
+ {
scripts[i] = get_char_script(pwcInChars[i]);
+ /* Devanagari danda (U+0964) and double danda (U+0965) are used for
+ all Indic scripts */
+ if ((pwcInChars[i] == 0x964 || pwcInChars[i] ==0x965) && last_indic > 0)
+ scripts[i] = last_indic;
+ else if (is_indic(scripts[i]))
+ last_indic = scripts[i];
+ }
if (psState && psControl)
{
More information about the wine-cvs
mailing list