| 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_FONT_H_ | 5 #ifndef UI_GFX_FONT_H_ |
| 6 #define UI_GFX_FONT_H_ | 6 #define UI_GFX_FONT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "ui/base/ui_export.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/ui_api.h" | |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 | 17 |
| 18 class PlatformFont; | 18 class PlatformFont; |
| 19 | 19 |
| 20 // Font provides a wrapper around an underlying font. Copy and assignment | 20 // Font provides a wrapper around an underlying font. Copy and assignment |
| 21 // operators are explicitly allowed, and cheap. | 21 // operators are explicitly allowed, and cheap. |
| 22 class UI_API Font { | 22 class UI_EXPORT Font { |
| 23 public: | 23 public: |
| 24 // The following constants indicate the font style. | 24 // The following constants indicate the font style. |
| 25 enum FontStyle { | 25 enum FontStyle { |
| 26 NORMAL = 0, | 26 NORMAL = 0, |
| 27 BOLD = 1, | 27 BOLD = 1, |
| 28 ITALIC = 2, | 28 ITALIC = 2, |
| 29 UNDERLINED = 4, | 29 UNDERLINED = 4, |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 // Creates a font with the default name and style. | 32 // Creates a font with the default name and style. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 PlatformFont* platform_font() const { return platform_font_.get(); } | 105 PlatformFont* platform_font() const { return platform_font_.get(); } |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 // Wrapped platform font implementation. | 108 // Wrapped platform font implementation. |
| 109 scoped_refptr<PlatformFont> platform_font_; | 109 scoped_refptr<PlatformFont> platform_font_; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace gfx | 112 } // namespace gfx |
| 113 | 113 |
| 114 #endif // UI_GFX_FONT_H_ | 114 #endif // UI_GFX_FONT_H_ |
| OLD | NEW |