summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-11-10 05:42:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-10 05:42:52 +0000
commit18fd4aa8bd0916d80e7f03fff1942ae5bbd2fa7e (patch)
tree524a79d538d1282e8a5b4d6038798eac78b566a2 /Source/WebCore/platform
parentaf822d073210c5eea6e72e2c970cbd5c217dacbe (diff)
parent7c7fadaed03fc262d86394fc08ae3948ebc904e1 (diff)
downloadexternal_webkit-18fd4aa8bd0916d80e7f03fff1942ae5bbd2fa7e.zip
external_webkit-18fd4aa8bd0916d80e7f03fff1942ae5bbd2fa7e.tar.gz
external_webkit-18fd4aa8bd0916d80e7f03fff1942ae5bbd2fa7e.tar.bz2
am 7c7fadae: Merge "Add support for Bengali and Tamil gpos/gsub tables" into ics-mr1
* commit '7c7fadaed03fc262d86394fc08ae3948ebc904e1': Add support for Bengali and Tamil gpos/gsub tables
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/graphics/android/FontAndroid.cpp36
1 files changed, 23 insertions, 13 deletions
diff --git a/Source/WebCore/platform/graphics/android/FontAndroid.cpp b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
index 287043d..13d276a 100644
--- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
@@ -445,11 +445,13 @@ public:
private:
enum CustomScript {
- Hindi,
- Thai,
- Naskh,
+ Bengali,
+ Devanagari,
Hebrew,
HebrewBold,
+ Naskh,
+ Tamil,
+ Thai,
NUM_SCRIPTS
};
@@ -503,11 +505,13 @@ private:
// Indexed using enum CustomScript
const char* TextRunWalker::paths[] = {
+ "/system/fonts/Lohit-Bengali.ttf",
"/system/fonts/Lohit-Devanagari.ttf",
- "/system/fonts/DroidSansThai.ttf",
- "/system/fonts/DroidNaskh-Regular.ttf",
"/system/fonts/DroidSansHebrew-Regular.ttf",
- "/system/fonts/DroidSansHebrew-Bold.ttf"
+ "/system/fonts/DroidSansHebrew-Bold.ttf",
+ "/system/fonts/DroidNaskh-Regular.ttf",
+ "/system/fonts/Lohit-Tamil.ttf",
+ "/system/fonts/DroidSansThai.ttf"
};
// Indexed using enum CustomScript
@@ -691,14 +695,11 @@ void TextRunWalker::setupFontForScriptRun()
const FontPlatformData* complexPlatformData = &platformData;
switch (m_item.item.script) {
+ case HB_Script_Bengali:
+ complexPlatformData = setupComplexFont(Bengali, platformData);
+ break;
case HB_Script_Devanagari:
- complexPlatformData = setupComplexFont(Hindi, platformData);
- break;
- case HB_Script_Thai:
- complexPlatformData = setupComplexFont(Thai, platformData);
- break;
- case HB_Script_Arabic:
- complexPlatformData = setupComplexFont(Naskh, platformData);
+ complexPlatformData = setupComplexFont(Devanagari, platformData);
break;
case HB_Script_Hebrew:
switch (platformData.typeface()->style()) {
@@ -713,6 +714,15 @@ void TextRunWalker::setupFontForScriptRun()
break;
}
break;
+ case HB_Script_Arabic:
+ complexPlatformData = setupComplexFont(Naskh, platformData);
+ break;
+ case HB_Script_Tamil:
+ complexPlatformData = setupComplexFont(Tamil, platformData);
+ break;
+ case HB_Script_Thai:
+ complexPlatformData = setupComplexFont(Thai, platformData);
+ break;
default:
// HB_Script_Common; includes Ethiopic
complexPlatformData = &platformData;