summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 17:36:37 +0000
committerkochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 17:36:37 +0000
commitabe19c107967234fce377db157b8b963f83ec529 (patch)
treec43a8c65085f13a993d9510ed50372a531612533
parent48ddb167eaedd08cf087fcbfc5e1cecb8112c23e (diff)
downloadchromium_src-abe19c107967234fce377db157b8b963f83ec529.zip
chromium_src-abe19c107967234fce377db157b8b963f83ec529.tar.gz
chromium_src-abe19c107967234fce377db157b8b963f83ec529.tar.bz2
Set the standard font from 'serif' family font.
This is regardless of serif/sans-serif preference, because we don't have such pref UI for now. Otherwise some languages (CJK), which has sans-serif as a default font (IDS_STANDARD_FONT_IS_SERIF = false), they have no way to select a standard fallback font. Note that this is a temporary workaround that needs more fundamental fix. BUG=73845, chromium-os:12311 TEST=manually (in Japanese, set the font and go to http://www.asahi.com ) Review URL: http://codereview.chromium.org/6568006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75900 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 1acf625..87d92fa 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -203,10 +203,12 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
UTF8ToUTF16(prefs->GetString(prefs::kWebKitSerifFontFamily));
web_prefs.sans_serif_font_family =
UTF8ToUTF16(prefs->GetString(prefs::kWebKitSansSerifFontFamily));
- if (prefs->GetBoolean(prefs::kWebKitStandardFontIsSerif))
- web_prefs.standard_font_family = web_prefs.serif_font_family;
- else
- web_prefs.standard_font_family = web_prefs.sans_serif_font_family;
+ // TODO(kochi): As we don't have setting UI for kWebKitStandardFontIsSerif,
+ // we always use web_prefs.serif_font_family as a standard font
+ // temporarily for now. Ideally we should have a pref UI for serif/sans
+ // selection as for CJK font sans-serif family font is the default.
+ // See discussion in http://crosbug.com/12311.
+ web_prefs.standard_font_family = web_prefs.serif_font_family;
web_prefs.cursive_font_family =
UTF8ToUTF16(prefs->GetString(prefs::kWebKitCursiveFontFamily));
web_prefs.fantasy_font_family =