OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gfx/platform_font_win.h" | 5 #include "ui/gfx/platform_font_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <math.h> | 8 #include <math.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/sys_string_conversions.h" | 15 #include "base/strings/sys_string_conversions.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/win/scoped_hdc.h" | 17 #include "base/win/scoped_hdc.h" |
18 #include "base/win/scoped_select_object.h" | 18 #include "base/win/scoped_select_object.h" |
19 #include "base/win/win_util.h" | 19 #include "base/win/win_util.h" |
20 #include "ui/base/win/scoped_set_map_mode.h" | 20 #include "ui/base/win/scoped_set_map_mode.h" |
21 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
22 #include "ui/gfx/font.h" | 22 #include "ui/gfx/font.h" |
23 | 23 |
24 namespace { | 24 namespace { |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 return new PlatformFontWin(native_font); | 315 return new PlatformFontWin(native_font); |
316 } | 316 } |
317 | 317 |
318 // static | 318 // static |
319 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name, | 319 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name, |
320 int font_size) { | 320 int font_size) { |
321 return new PlatformFontWin(font_name, font_size); | 321 return new PlatformFontWin(font_name, font_size); |
322 } | 322 } |
323 | 323 |
324 } // namespace gfx | 324 } // namespace gfx |
OLD | NEW |