OLD | NEW |
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 #ifndef UI_GFX_PLATFORM_FONT_WIN_ | 5 #ifndef UI_GFX_PLATFORM_FONT_WIN_ |
6 #define UI_GFX_PLATFORM_FONT_WIN_ | 6 #define UI_GFX_PLATFORM_FONT_WIN_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "ui/gfx/platform_font.h" | 10 #include "ui/gfx/platform_font.h" |
| 11 #include "ui/ui_api.h" |
11 | 12 |
12 namespace gfx { | 13 namespace gfx { |
13 | 14 |
14 class PlatformFontWin : public PlatformFont { | 15 class UI_API PlatformFontWin : public PlatformFont { |
15 public: | 16 public: |
16 PlatformFontWin(); | 17 PlatformFontWin(); |
17 explicit PlatformFontWin(const Font& other); | 18 explicit PlatformFontWin(const Font& other); |
18 explicit PlatformFontWin(NativeFont native_font); | 19 explicit PlatformFontWin(NativeFont native_font); |
19 PlatformFontWin(const string16& font_name, | 20 PlatformFontWin(const string16& font_name, |
20 int font_size); | 21 int font_size); |
21 | 22 |
22 // Dialog units to pixels conversion. | 23 // Dialog units to pixels conversion. |
23 // See http://support.microsoft.com/kb/145994 for details. | 24 // See http://support.microsoft.com/kb/145994 for details. |
24 int horizontal_dlus_to_pixels(int dlus) const { | 25 int horizontal_dlus_to_pixels(int dlus) const { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 static HFontRef* base_font_ref_; | 123 static HFontRef* base_font_ref_; |
123 | 124 |
124 // Indirect reference to the HFontRef, which references the underlying HFONT. | 125 // Indirect reference to the HFontRef, which references the underlying HFONT. |
125 scoped_refptr<HFontRef> font_ref_; | 126 scoped_refptr<HFontRef> font_ref_; |
126 }; | 127 }; |
127 | 128 |
128 } // namespace gfx | 129 } // namespace gfx |
129 | 130 |
130 #endif // UI_GFX_PLATFORM_FONT_WIN_ | 131 #endif // UI_GFX_PLATFORM_FONT_WIN_ |
131 | 132 |
OLD | NEW |