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_PANGO_H_ | 5 #ifndef UI_GFX_PLATFORM_FONT_PANGO_H_ |
6 #define UI_GFX_PLATFORM_FONT_PANGO_H_ | 6 #define UI_GFX_PLATFORM_FONT_PANGO_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "skia/ext/refptr.h" | 10 #include "skia/ext/refptr.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // drawn at y + height + underline_position. | 36 // drawn at y + height + underline_position. |
37 double underline_position() const; | 37 double underline_position() const; |
38 // The thickness to draw the underline. | 38 // The thickness to draw the underline. |
39 double underline_thickness() const; | 39 double underline_thickness() const; |
40 | 40 |
41 // Overridden from PlatformFont: | 41 // Overridden from PlatformFont: |
42 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; | 42 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; |
43 virtual int GetHeight() const OVERRIDE; | 43 virtual int GetHeight() const OVERRIDE; |
44 virtual int GetBaseline() const OVERRIDE; | 44 virtual int GetBaseline() const OVERRIDE; |
45 virtual int GetAverageCharacterWidth() const OVERRIDE; | 45 virtual int GetAverageCharacterWidth() const OVERRIDE; |
46 virtual int GetStringWidth(const string16& text) const OVERRIDE; | 46 virtual int GetStringWidth(const base::string16& text) const OVERRIDE; |
47 virtual int GetExpectedTextWidth(int length) const OVERRIDE; | 47 virtual int GetExpectedTextWidth(int length) const OVERRIDE; |
48 virtual int GetStyle() const OVERRIDE; | 48 virtual int GetStyle() const OVERRIDE; |
49 virtual std::string GetFontName() const OVERRIDE; | 49 virtual std::string GetFontName() const OVERRIDE; |
50 virtual int GetFontSize() const OVERRIDE; | 50 virtual int GetFontSize() const OVERRIDE; |
51 virtual NativeFont GetNativeFont() const OVERRIDE; | 51 virtual NativeFont GetNativeFont() const OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
54 // Create a new instance of this object with the specified properties. Called | 54 // Create a new instance of this object with the specified properties. Called |
55 // from DeriveFont. | 55 // from DeriveFont. |
56 PlatformFontPango(const skia::RefPtr<SkTypeface>& typeface, | 56 PlatformFontPango(const skia::RefPtr<SkTypeface>& typeface, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 // The default font, used for the default constructor. | 102 // The default font, used for the default constructor. |
103 static Font* default_font_; | 103 static Font* default_font_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(PlatformFontPango); | 105 DISALLOW_COPY_AND_ASSIGN(PlatformFontPango); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace gfx | 108 } // namespace gfx |
109 | 109 |
110 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_ | 110 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_ |
OLD | NEW |