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/platform_font.h" | 10 #include "ui/gfx/platform_font.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Overridden from PlatformFont: | 21 // Overridden from PlatformFont: |
22 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; | 22 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; |
23 virtual int GetHeight() const OVERRIDE; | 23 virtual int GetHeight() const OVERRIDE; |
24 virtual int GetBaseline() const OVERRIDE; | 24 virtual int GetBaseline() const OVERRIDE; |
25 virtual int GetCapHeight() const OVERRIDE; | 25 virtual int GetCapHeight() const OVERRIDE; |
26 virtual int GetAverageCharacterWidth() const OVERRIDE; | 26 virtual int GetAverageCharacterWidth() const OVERRIDE; |
27 virtual int GetStringWidth(const base::string16& text) const OVERRIDE; | 27 virtual int GetStringWidth(const base::string16& text) const OVERRIDE; |
28 virtual int GetExpectedTextWidth(int length) const OVERRIDE; | 28 virtual int GetExpectedTextWidth(int length) const OVERRIDE; |
29 virtual int GetStyle() const OVERRIDE; | 29 virtual int GetStyle() const OVERRIDE; |
30 virtual std::string GetFontName() const OVERRIDE; | 30 virtual std::string GetFontName() const OVERRIDE; |
| 31 virtual std::string GetActualFontNameForTesting() const OVERRIDE; |
31 virtual int GetFontSize() const OVERRIDE; | 32 virtual int GetFontSize() const OVERRIDE; |
32 virtual NativeFont GetNativeFont() const OVERRIDE; | 33 virtual NativeFont GetNativeFont() const OVERRIDE; |
33 | 34 |
34 private: | 35 private: |
35 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); |
36 virtual ~PlatformFontMac(); | 37 virtual ~PlatformFontMac(); |
37 | 38 |
38 // Calculates and caches the font metrics. | 39 // Calculates and caches the font metrics. |
39 void CalculateMetrics(); | 40 void CalculateMetrics(); |
40 | 41 |
(...skipping 14 matching lines...) Expand all Loading... |
55 int ascent_; | 56 int ascent_; |
56 int cap_height_; | 57 int cap_height_; |
57 int average_width_; | 58 int average_width_; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); | 60 DISALLOW_COPY_AND_ASSIGN(PlatformFontMac); |
60 }; | 61 }; |
61 | 62 |
62 } // namespace gfx | 63 } // namespace gfx |
63 | 64 |
64 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ | 65 #endif // UI_GFX_PLATFORM_FONT_MAC_H_ |
OLD | NEW |