bug 1012365 - workaround for Devanagari fonts that lack support for U+0972 on Android. r=jdaggett

This commit is contained in:
Jonathan Kew 2014-06-02 12:46:49 +01:00
parent b24097f49a
commit 5120924fba
2 changed files with 18 additions and 0 deletions

View File

@ -515,6 +515,15 @@ FT2FontEntry::ReadCMAP(FontInfoData *aFontInfoData)
}
}
#ifdef MOZ_WIDGET_ANDROID
// Hack for the SamsungDevanagari font, bug 1012365:
// pretend the font supports U+0972.
if (!charmap->test(0x0972) &&
charmap->test(0x0905) && charmap->test(0x0945)) {
charmap->set(0x0972);
}
#endif
mHasCmapTable = NS_SUCCEEDED(rv);
if (mHasCmapTable) {
gfxPlatformFontList *pfl = gfxPlatformFontList::PlatformFontList();

View File

@ -795,6 +795,15 @@ HBUnicodeDecompose(hb_unicode_funcs_t *ufuncs,
hb_codepoint_t *b,
void *user_data)
{
#ifdef MOZ_WIDGET_ANDROID
// Hack for the SamsungDevanagari font, bug 1012365:
// support U+0972 by decomposing it.
if (ab == 0x0972) {
*a = 0x0905;
*b = 0x0945;
return true;
}
#endif
return nsUnicodeNormalizer::DecomposeNonRecursively(ab, a, b);
}