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