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

Side by Side Diff: trunk/src/ui/base/l10n/l10n_util_win.cc

Issue 474483002: Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/l10n/l10n_util_win.h" 5 #include "ui/base/l10n/l10n_util_win.h"
6 6
7 #include <windowsx.h> 7 #include <windowsx.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 ::InvalidateRect(hwnd, NULL, true); 105 ::InvalidateRect(hwnd, NULL, true);
106 } 106 }
107 } 107 }
108 108
109 bool IsLocaleSupportedByOS(const std::string& locale) { 109 bool IsLocaleSupportedByOS(const std::string& locale) {
110 // Block Amharic on Windows XP unless 'Abyssinica SIL' font is present. 110 // Block Amharic on Windows XP unless 'Abyssinica SIL' font is present.
111 // On Win XP, no Ethiopic/Amahric font is availabel out of box. We hard-coded 111 // On Win XP, no Ethiopic/Amahric font is availabel out of box. We hard-coded
112 // 'Abyssinica SIL' in the resource bundle to use in the UI. Check 112 // 'Abyssinica SIL' in the resource bundle to use in the UI. Check
113 // for its presence to determine whether or not to support Amharic UI on XP. 113 // for its presence to determine whether or not to support Amharic UI on XP.
114 return (base::win::GetVersion() >= base::win::VERSION_VISTA || 114 return (base::win::GetVersion() >= base::win::VERSION_VISTA ||
115 !base::LowerCaseEqualsASCII(locale, "am") || 115 !LowerCaseEqualsASCII(locale, "am") || IsFontPresent(L"Abyssinica SIL"));
116 IsFontPresent(L"Abyssinica SIL"));
117 } 116 }
118 117
119 bool NeedOverrideDefaultUIFont(base::string16* override_font_family, 118 bool NeedOverrideDefaultUIFont(base::string16* override_font_family,
120 double* font_size_scaler) { 119 double* font_size_scaler) {
121 // This is rather simple-minded to deal with the UI font size 120 // This is rather simple-minded to deal with the UI font size
122 // issue for some Indian locales (ml, bn, hi) for which 121 // issue for some Indian locales (ml, bn, hi) for which
123 // the default Windows fonts are too small to be legible. For those 122 // the default Windows fonts are too small to be legible. For those
124 // locales, IDS_UI_FONT_FAMILY is set to an actual font family to 123 // locales, IDS_UI_FONT_FAMILY is set to an actual font family to
125 // use while for other locales, it's set to 'default'. 124 // use while for other locales, it's set to 'default'.
126 125
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } else { 197 } else {
199 NOTREACHED() << "Failed to determine the UI language for locale override."; 198 NOTREACHED() << "Failed to determine the UI language for locale override.";
200 } 199 }
201 } 200 }
202 201
203 const std::vector<std::string>& GetLocaleOverrides() { 202 const std::vector<std::string>& GetLocaleOverrides() {
204 return override_locale_holder.Get().value(); 203 return override_locale_holder.Get().value();
205 } 204 }
206 205
207 } // namespace l10n_util 206 } // namespace l10n_util
OLDNEW
« no previous file with comments | « trunk/src/ui/base/l10n/l10n_util_posix.cc ('k') | trunk/src/webkit/common/fileapi/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698