| 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 "ui/gfx/font_render_params.h" | 10 #include "ui/gfx/font_render_params.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // Overridden from PlatformFont: | 22 // Overridden from PlatformFont: |
| 23 Font DeriveFont(int size_delta, int style) const override; | 23 Font DeriveFont(int size_delta, int style) const override; |
| 24 int GetHeight() const override; | 24 int GetHeight() const override; |
| 25 int GetBaseline() const override; | 25 int GetBaseline() const override; |
| 26 int GetCapHeight() const override; | 26 int GetCapHeight() const override; |
| 27 int GetExpectedTextWidth(int length) const override; | 27 int GetExpectedTextWidth(int length) const override; |
| 28 int GetStyle() const override; | 28 int GetStyle() const override; |
| 29 std::string GetFontName() const override; | 29 std::string GetFontName() const override; |
| 30 std::string GetActualFontNameForTesting() const override; | 30 std::string GetActualFontNameForTesting() const override; |
| 31 int GetFontSize() const override; | 31 int GetFontSize() const override; |
| 32 const FontRenderParams& GetFontRenderParams() const override; | 32 const FontRenderParams& GetFontRenderParams() override; |
| 33 NativeFont GetNativeFont() const override; | 33 NativeFont GetNativeFont() const override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 PlatformFontMac(const std::string& font_name, int font_size, int font_style); | 36 PlatformFontMac(const std::string& font_name, int font_size, int font_style); |
| 37 ~PlatformFontMac() override; | 37 ~PlatformFontMac() override; |
| 38 | 38 |
| 39 // Calculates and caches the font metrics and inits |render_params_|. | 39 // Calculates and caches the font metrics and inits |render_params_|. |
| 40 void CalculateMetricsAndInitRenderParams(); | 40 void CalculateMetricsAndInitRenderParams(); |
| 41 | 41 |
| 42 // The NSFont instance for this object. If this object was constructed from an | 42 // The NSFont instance for this object. If this object was constructed from an |
| (...skipping 16 matching lines...) Expand all Loading... |
| 59 | 59 |
| 60 // Details about how the font should be rendered. | 60 // Details about how the font should be rendered. |
| 61 FontRenderParams render_params_; | 61 FontRenderParams render_params_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); | 63 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace gfx | 66 } // namespace gfx |
| 67 | 67 |
| 68 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ | 68 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ |
| OLD | NEW |