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

Unified Diff: app/l10n_util_win.cc

Issue 113916: Make the UI font honor the OS settings when the resource bundle is not available. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/l10n_util_win.cc
===================================================================
--- app/l10n_util_win.cc (revision 16999)
+++ app/l10n_util_win.cc (working copy)
@@ -87,7 +87,13 @@
std::wstring ui_font_family = GetString(ui_font_family_id);
int scaler100 = StringToInt(l10n_util::GetString(ui_font_size_scaler_id));
- if (ui_font_family == L"default" && scaler100 == 100)
+ // We use the OS default in two cases:
+ // 1) The resource bundle has 'default' and '100' for font family and
+ // font scaler.
+ // 2) The resource bundle is not available for some reason and
+ // ui_font_family is empty.
+ if (ui_font_family == L"default" && scaler100 == 100 ||
+ ui_font_family.empty())
return false;
if (override_font_family && font_size_scaler) {
override_font_family->swap(ui_font_family);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698