Chromium Code Reviews| 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 #ifndef UI_GFX_FONT_H_ | 5 #ifndef UI_GFX_FONT_H_ |
| 6 #define UI_GFX_FONT_H_ | 6 #define UI_GFX_FONT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 // Windows: This handle is owned by the Font object, and should not be | 123 // Windows: This handle is owned by the Font object, and should not be |
| 124 // destroyed by the caller. | 124 // destroyed by the caller. |
| 125 // Mac: The object is owned by the system and should not be released. | 125 // Mac: The object is owned by the system and should not be released. |
| 126 NativeFont GetNativeFont() const; | 126 NativeFont GetNativeFont() const; |
| 127 #endif | 127 #endif |
| 128 | 128 |
| 129 // Raw access to the underlying platform font implementation. Can be | 129 // Raw access to the underlying platform font implementation. Can be |
| 130 // static_cast to a known implementation type if needed. | 130 // static_cast to a known implementation type if needed. |
| 131 PlatformFont* platform_font() const { return platform_font_.get(); } | 131 PlatformFont* platform_font() const { return platform_font_.get(); } |
| 132 | 132 |
| 133 static std::string FirstAvailableOrFirst(const std::string&); | |
|
msw
2016/10/26 20:33:49
Add a comment, what's the difference between "firs
msw
2016/10/26 20:33:49
Is this actually needed as part of the gfx::font a
| |
| 134 | |
| 133 private: | 135 private: |
| 134 // Wrapped platform font implementation. | 136 // Wrapped platform font implementation. |
| 135 scoped_refptr<PlatformFont> platform_font_; | 137 scoped_refptr<PlatformFont> platform_font_; |
| 136 }; | 138 }; |
| 137 | 139 |
| 138 #ifndef NDEBUG | 140 #ifndef NDEBUG |
| 139 GFX_EXPORT std::ostream& operator<<(std::ostream& stream, | 141 GFX_EXPORT std::ostream& operator<<(std::ostream& stream, |
| 140 const Font::Weight weight); | 142 const Font::Weight weight); |
| 141 #endif | 143 #endif |
| 142 | 144 |
| 143 } // namespace gfx | 145 } // namespace gfx |
| 144 | 146 |
| 145 #endif // UI_GFX_FONT_H_ | 147 #endif // UI_GFX_FONT_H_ |
| OLD | NEW |