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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // an underline. This is a negative number, so the underline would be | 42 // an underline. This is a negative number, so the underline would be |
43 // drawn at y + height + underline_position. | 43 // drawn at y + height + underline_position. |
44 double underline_position() const; | 44 double underline_position() const; |
45 // The thickness to draw the underline. | 45 // The thickness to draw the underline. |
46 double underline_thickness() const; | 46 double underline_thickness() const; |
47 | 47 |
48 // Overridden from PlatformFont: | 48 // Overridden from PlatformFont: |
49 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; | 49 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; |
50 virtual int GetHeight() const OVERRIDE; | 50 virtual int GetHeight() const OVERRIDE; |
51 virtual int GetBaseline() const OVERRIDE; | 51 virtual int GetBaseline() const OVERRIDE; |
52 virtual int GetAverageCharacterWidth() const OVERRIDE; | 52 virtual float GetAverageCharacterWidth() const OVERRIDE; |
53 virtual int GetStringWidth(const base::string16& text) const OVERRIDE; | 53 virtual float GetStringWidth(const base::string16& text) const OVERRIDE; |
54 virtual int GetExpectedTextWidth(int length) const OVERRIDE; | 54 virtual float GetExpectedTextWidth(int length) const OVERRIDE; |
55 virtual int GetStyle() const OVERRIDE; | 55 virtual int GetStyle() const OVERRIDE; |
56 virtual std::string GetFontName() const OVERRIDE; | 56 virtual std::string GetFontName() const OVERRIDE; |
57 virtual int GetFontSize() const OVERRIDE; | 57 virtual int GetFontSize() const OVERRIDE; |
58 virtual NativeFont GetNativeFont() const OVERRIDE; | 58 virtual NativeFont GetNativeFont() const OVERRIDE; |
59 | 59 |
60 private: | 60 private: |
61 // Create a new instance of this object with the specified properties. Called | 61 // Create a new instance of this object with the specified properties. Called |
62 // from DeriveFont. | 62 // from DeriveFont. |
63 PlatformFontPango(const skia::RefPtr<SkTypeface>& typeface, | 63 PlatformFontPango(const skia::RefPtr<SkTypeface>& typeface, |
64 const std::string& name, | 64 const std::string& name, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
117 static std::string* default_font_description_; | 117 static std::string* default_font_description_; |
118 #endif | 118 #endif |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(PlatformFontPango); | 120 DISALLOW_COPY_AND_ASSIGN(PlatformFontPango); |
121 }; | 121 }; |
122 | 122 |
123 } // namespace gfx | 123 } // namespace gfx |
124 | 124 |
125 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_ | 125 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_ |
OLD | NEW |