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

Unified Diff: ui/gfx/platform_font_win.cc

Issue 11087016: Create font with DEFAULT_CHARSET instead of ANSI_CHARSET. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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: ui/gfx/platform_font_win.cc
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
index a9a7a43faf5f6ec43d5f3ab7ff03029c19195773..b4a0ae14c72535798bf2903b7dbe3b4b7e497006 100644
--- a/ui/gfx/platform_font_win.cc
+++ b/ui/gfx/platform_font_win.cc
@@ -193,9 +193,9 @@ void PlatformFontWin::InitWithCopyOfHFONT(HFONT hfont) {
void PlatformFontWin::InitWithFontNameAndSize(const std::string& font_name,
int font_size) {
- HFONT hf = ::CreateFont(-font_size, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- UTF8ToUTF16(font_name).c_str());
- font_ref_ = CreateHFontRef(hf);
+ HFONT hf = ::CreateFont(-font_size, 0, 0, 0, 0, 0, 0, 0, DEFAULT_CHARSET, 0,
+ 0, 0, 0, UTF8ToUTF16(font_name).c_str());
+ font_ref_ = hf ? CreateHFontRef(hf) : GetBaseFontRef();
}
// static
« 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