bug 831354 - update default font prefs to use the bundled Open Sans and Charis SIL Compact on Android, but not on Gonk. r=dbaron
authorJonathan Kew <jkew@mozilla.com>
Sat, 19 Jan 2013 21:36:11 +0000
changeset 119369 f849e0aa18d6999c7a2e5bdf609b9eb27cf00f89
parent 119368 abafe7350c6f1a95a7811b17ec23f6440be0a7ac
child 119370 0d4ce26f2c28b1892e25b644bc615702179ff167
push id21638
push userjkew@mozilla.com
push dateSat, 19 Jan 2013 21:36:54 +0000
treeherdermozilla-inbound@0d4ce26f2c28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs831354
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 831354 - update default font prefs to use the bundled Open Sans and Charis SIL Compact on Android, but not on Gonk. r=dbaron
modules/libpref/src/init/all.js
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -3108,16 +3108,26 @@ pref("print.print_paper_size", 0);
 // print_extra_margin enables platforms to specify an extra gap or margin
 // around the content of the page for Print Preview only
 pref("print.print_extra_margin", 0); // twips
 
 // font names
 
 pref("font.alias-list", "sans,sans-serif,serif,monospace");
 
+// As we ship bundled Open Sans and Charis SIL Compact fonts on Android,
+// but not on B2G/Gonk, we give them separate default font preferences.
+
+#ifdef MOZ_WIDGET_GONK
+
+// TODO: this block is initially a copy of the ANDROID prefs as they were
+// prior to the switch to Open Sans and Charis SIL Compact (bug 831354).
+// We should review these in the light of what's actually present on the Gonk platform;
+// some entries could probably be cleaned up.
+
 // ar
 
 pref("font.name.serif.el", "Droid Serif");
 pref("font.name.sans-serif.el", "Droid Sans");
 pref("font.name.monospace.el", "Droid Sans Mono");
 pref("font.name-list.sans-serif.el", "Roboto, Droid Sans");
 
 pref("font.name.serif.he", "Droid Serif");
@@ -3182,16 +3192,98 @@ pref("font.name.monospace.zh-CN", "Droid
 pref("font.name.serif.zh-HK", "Droid Serif");
 pref("font.name.sans-serif.zh-HK", "Droid Sans");
 pref("font.name.monospace.zh-HK", "Droid Sans Mono");
 
 pref("font.name.serif.zh-TW", "Droid Serif");
 pref("font.name.sans-serif.zh-TW", "Droid Sans");
 pref("font.name.monospace.zh-TW", "Droid Sans Mono");
 
+#else
+
+// not MOZ_WIDGET_GONK (i.e. this is Firefox for Android) - here, we use the bundled fonts
+
+// ar
+
+pref("font.name.serif.el", "Droid Serif"); // not Charis SIL Compact, only has a few Greek chars
+pref("font.name.sans-serif.el", "Open Sans");
+pref("font.name.monospace.el", "Droid Sans Mono");
+pref("font.name-list.sans-serif.el", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.he", "Droid Serif");
+pref("font.name.sans-serif.he", "Open Sans");
+pref("font.name.monospace.he", "Droid Sans Mono");
+pref("font.name-list.sans-serif.he", "Droid Sans Hebrew, Open Sans, Droid Sans");
+
+pref("font.name.serif.ja", "Charis SIL Compact");
+pref("font.name.sans-serif.ja", "Open Sans");
+pref("font.name.monospace.ja", "MotoyaLMaru");
+pref("font.name-list.sans-serif.ja", "Open Sans, Roboto, Droid Sans, MotoyaLMaru, MotoyaLCedar, Droid Sans Japanese");
+pref("font.name-list.monospace.ja", "MotoyaLMaru, MotoyaLCedar, Droid Sans Mono");
+
+pref("font.name.serif.ko", "Charis SIL Compact");
+pref("font.name.sans-serif.ko", "Open Sans");
+pref("font.name.monospace.ko", "Droid Sans Mono");
+
+pref("font.name.serif.th", "Charis SIL Compact");
+pref("font.name.sans-serif.th", "Open Sans");
+pref("font.name.monospace.th", "Droid Sans Mono");
+pref("font.name-list.sans-serif.th", "Droid Sans Thai, Open Sans, Droid Sans");
+
+pref("font.name.serif.tr", "Charis SIL Compact");
+pref("font.name.sans-serif.tr", "Open Sans");
+pref("font.name.monospace.tr", "Droid Sans Mono");
+pref("font.name-list.sans-serif.tr", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.x-baltic", "Charis SIL Compact");
+pref("font.name.sans-serif.x-baltic", "Open Sans");
+pref("font.name.monospace.x-baltic", "Droid Sans Mono");
+pref("font.name-list.sans-serif.x-baltic", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.x-central-euro", "Charis SIL Compact");
+pref("font.name.sans-serif.x-central-euro", "Open Sans");
+pref("font.name.monospace.x-central-euro", "Droid Sans Mono");
+pref("font.name-list.sans-serif.x-central-euro", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.x-cyrillic", "Charis SIL Compact");
+pref("font.name.sans-serif.x-cyrillic", "Open Sans");
+pref("font.name.monospace.x-cyrillic", "Droid Sans Mono");
+pref("font.name-list.sans-serif.x-cyrillic", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.x-unicode", "Charis SIL Compact");
+pref("font.name.sans-serif.x-unicode", "Open Sans");
+pref("font.name.monospace.x-unicode", "Droid Sans Mono");
+pref("font.name-list.sans-serif.x-unicode", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.x-user-def", "Charis SIL Compact");
+pref("font.name.sans-serif.x-user-def", "Open Sans");
+pref("font.name.monospace.x-user-def", "Droid Sans Mono");
+pref("font.name-list.sans-serif.x-user-def", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.x-western", "Charis SIL Compact");
+pref("font.name.sans-serif.x-western", "Open Sans");
+pref("font.name.monospace.x-western", "Droid Sans Mono");
+pref("font.name-list.sans-serif.x-western", "Open Sans, Roboto, Droid Sans");
+
+pref("font.name.serif.zh-CN", "Charis SIL Compact");
+pref("font.name.sans-serif.zh-CN", "Open Sans");
+pref("font.name.monospace.zh-CN", "Droid Sans Mono");
+
+pref("font.name.serif.zh-HK", "Charis SIL Compact");
+pref("font.name.sans-serif.zh-HK", "Open Sans");
+pref("font.name.monospace.zh-HK", "Droid Sans Mono");
+
+pref("font.name.serif.zh-TW", "Charis SIL Compact");
+pref("font.name.sans-serif.zh-TW", "Open Sans");
+pref("font.name.monospace.zh-TW", "Droid Sans Mono");
+
+// end ! MOZ_WIDGET_GONK
+
+#endif
+
 pref("font.default.ar", "sans-serif");
 pref("font.size.variable.ar", 16);
 pref("font.size.fixed.ar", 12);
 
 pref("font.default.el", "sans-serif");
 pref("font.size.variable.el", 16);
 pref("font.size.fixed.el", 12);