| 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_PLATFORM_FONT_MAC_H_ | 5 #ifndef UI_GFX_PLATFORM_FONT_MAC_H_ |
| 6 #define UI_GFX_PLATFORM_FONT_MAC_H_ | 6 #define UI_GFX_PLATFORM_FONT_MAC_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // constructors. | 63 // constructors. |
| 64 const std::string font_name_; // Corresponds to -[NSFont fontFamily]. | 64 const std::string font_name_; // Corresponds to -[NSFont fontFamily]. |
| 65 const int font_size_; | 65 const int font_size_; |
| 66 const int font_style_; | 66 const int font_style_; |
| 67 const Font::Weight font_weight_; | 67 const Font::Weight font_weight_; |
| 68 | 68 |
| 69 // Cached metrics, generated in CalculateMetrics(). | 69 // Cached metrics, generated in CalculateMetrics(). |
| 70 int height_; | 70 int height_; |
| 71 int ascent_; | 71 int ascent_; |
| 72 int cap_height_; | 72 int cap_height_; |
| 73 int average_width_; | 73 |
| 74 // Cached average width, generated in GetExpectedTextWidth(). |
| 75 float average_width_ = 0.0; |
| 74 | 76 |
| 75 // Details about how the font should be rendered. | 77 // Details about how the font should be rendered. |
| 76 FontRenderParams render_params_; | 78 FontRenderParams render_params_; |
| 77 | 79 |
| 78 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); | 80 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 } // namespace gfx | 83 } // namespace gfx |
| 82 | 84 |
| 83 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ | 85 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ |
| OLD | NEW |