Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 7748014: Add default per-script CJK fonts on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile error Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/resources/locale_settings_win.grd ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index 6fc949bf2b7db3c75d043f7e8b4f619c2660bf62..27603b040688509c2ca6aa5b69349015d94931ae 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -305,18 +305,12 @@ void TabContentsWrapper::RegisterUserPrefs(PrefService* prefs) {
IDS_FANTASY_FONT_FAMILY,
PrefService::UNSYNCABLE_PREF);
- // Register per-script font prefs that have defaults. Currently defaults are
- // defined only for some scripts and only on Chrome OS to begin with (it is
- // the easiest since we readily know what fonts are available there).
- // TODO(falken): add defaults for all platforms and for scripts that should
- // have defaults.
-#if defined(OS_CHROMEOS)
- prefs->RegisterLocalizedStringPref(prefs::kWebKitStandardFontFamilyArabic,
- IDS_STANDARD_FONT_FAMILY_ARABIC, PrefService::UNSYNCABLE_PREF);
- prefs->RegisterLocalizedStringPref(prefs::kWebKitSerifFontFamilyArabic,
- IDS_SERIF_FONT_FAMILY_ARABIC, PrefService::UNSYNCABLE_PREF);
- prefs->RegisterLocalizedStringPref(prefs::kWebKitSansSerifFontFamilyArabic,
- IDS_SANS_SERIF_FONT_FAMILY_ARABIC, PrefService::UNSYNCABLE_PREF);
+ // Register per-script font prefs that have defaults. The prefs that have
+ // defaults vary by platform, since not all platforms have fonts for all
+ // scripts for all generic families.
+ // TODO(falken): add proper defaults when possible for all
+ // platforms/scripts/generic families.
+#if defined(OS_CHROMEOS) || defined(OS_WIN)
sky 2011/08/25 14:52:05 These nested ifs are a bit unwieldy. How about an
falken 2011/08/26 11:17:25 Changed to use array.
prefs->RegisterLocalizedStringPref(prefs::kWebKitStandardFontFamilyJapanese,
IDS_STANDARD_FONT_FAMILY_JAPANESE, PrefService::UNSYNCABLE_PREF);
prefs->RegisterLocalizedStringPref(prefs::kWebKitFixedFontFamilyJapanese,
@@ -333,6 +327,10 @@ void TabContentsWrapper::RegisterUserPrefs(PrefService* prefs) {
IDS_SERIF_FONT_FAMILY_KOREAN, PrefService::UNSYNCABLE_PREF);
prefs->RegisterLocalizedStringPref(prefs::kWebKitSansSerifFontFamilyKorean,
IDS_SANS_SERIF_FONT_FAMILY_KOREAN, PrefService::UNSYNCABLE_PREF);
+#if defined(OS_WIN)
+ prefs->RegisterLocalizedStringPref(prefs::kWebKitCursiveFontFamilyKorean,
+ IDS_CURSIVE_FONT_FAMILY_KOREAN, PrefService::UNSYNCABLE_PREF);
+#endif
prefs->RegisterLocalizedStringPref(
prefs::kWebKitStandardFontFamilySimplifiedHan,
IDS_STANDARD_FONT_FAMILY_SIMPLIFIED_HAN, PrefService::UNSYNCABLE_PREF);
@@ -343,6 +341,15 @@ void TabContentsWrapper::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterLocalizedStringPref(
prefs::kWebKitSansSerifFontFamilySimplifiedHan,
IDS_SANS_SERIF_FONT_FAMILY_SIMPLIFIED_HAN, PrefService::UNSYNCABLE_PREF);
+#endif
+
+#if defined(OS_CHROMEOS)
+ prefs->RegisterLocalizedStringPref(prefs::kWebKitStandardFontFamilyArabic,
+ IDS_STANDARD_FONT_FAMILY_ARABIC, PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterLocalizedStringPref(prefs::kWebKitSerifFontFamilyArabic,
+ IDS_SERIF_FONT_FAMILY_ARABIC, PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterLocalizedStringPref(prefs::kWebKitSansSerifFontFamilyArabic,
+ IDS_SANS_SERIF_FONT_FAMILY_ARABIC, PrefService::UNSYNCABLE_PREF);
prefs->RegisterLocalizedStringPref(
prefs::kWebKitStandardFontFamilyTraditionalHan,
IDS_STANDARD_FONT_FAMILY_TRADITIONAL_HAN, PrefService::UNSYNCABLE_PREF);
« no previous file with comments | « chrome/app/resources/locale_settings_win.grd ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698