usp10: Insert dotted circle (U+25CC) for invalid combining sequences in Thaana.

This commit is contained in:
Aric Stewart 2012-06-04 07:44:09 -05:00 committed by Alexandre Julliard
parent 3fd459b232
commit 14f42cdcbc
1 changed files with 40 additions and 1 deletions

View File

@ -44,6 +44,7 @@ typedef VOID (*ContextualShapingProc)(HDC, ScriptCache*, SCRIPT_ANALYSIS*,
static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
static void ContextualShape_Hebrew(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
static void ContextualShape_Syriac(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
static void ContextualShape_Thaana(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
static void ContextualShape_Phags_pa(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
static void ContextualShape_Sinhala(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
static void ContextualShape_Devanagari(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
@ -398,7 +399,7 @@ static const ScriptShapeData ShapingData[] =
{{ hebrew_features, 1}, NULL, 0, ContextualShape_Hebrew, NULL},
{{ syriac_features, 4}, required_syriac_features, 0, ContextualShape_Syriac, ShapeCharGlyphProp_None},
{{ arabic_features, 6}, required_arabic_features, 0, ContextualShape_Arabic, ShapeCharGlyphProp_Arabic},
{{ NULL, 0}, NULL, 0, NULL, ShapeCharGlyphProp_None},
{{ NULL, 0}, NULL, 0, ContextualShape_Thaana, ShapeCharGlyphProp_None},
{{ standard_features, 2}, NULL, 0, NULL, NULL},
{{ standard_features, 2}, NULL, 0, NULL, NULL},
{{ standard_features, 2}, NULL, 0, NULL, NULL},
@ -1241,6 +1242,44 @@ right_join_causing(neighbour_joining_type(i,dirR,context_type,cChars,psa)))
mark_invalid_combinations(hdc, pwcChars, cChars, pwOutGlyphs, pcGlyphs, dirL, pwLogClust, combining_lexical_Syriac);
}
static int combining_lexical_Thaana(WCHAR c)
{
enum {Thaana_Norm=0, Thaana_FILI};
switch(c)
{
case 0x7A6:
case 0x7A7:
case 0x7A8:
case 0x7A9:
case 0x7AA:
case 0x7AB:
case 0x7AC:
case 0x7AD:
case 0x7AE:
case 0x7AF: return Thaana_FILI; break;
default: return Thaana_Norm;
}
}
static void ContextualShape_Thaana(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust)
{
INT dirL;
if (*pcGlyphs != cChars)
{
ERR("Number of Glyphs and Chars need to match at the beginning\n");
return;
}
if (!psa->fLogicalOrder && psa->fRTL)
dirL = -1;
else
dirL = 1;
mark_invalid_combinations(hdc, pwcChars, cChars, pwOutGlyphs, pcGlyphs, dirL, pwLogClust, combining_lexical_Thaana);
}
/*
* ContextualShape_Phags_pa
*/