| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // drawn at y + height + underline_position; | 37 // drawn at y + height + underline_position; |
| 38 double underline_position() const; | 38 double underline_position() const; |
| 39 // The thickness to draw the underline. | 39 // The thickness to draw the underline. |
| 40 double underline_thickness() const; | 40 double underline_thickness() const; |
| 41 | 41 |
| 42 // Overridden from PlatformFont: | 42 // Overridden from PlatformFont: |
| 43 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; | 43 virtual Font DeriveFont(int size_delta, int style) const OVERRIDE; |
| 44 virtual int GetHeight() const OVERRIDE; | 44 virtual int GetHeight() const OVERRIDE; |
| 45 virtual int GetBaseline() const OVERRIDE; | 45 virtual int GetBaseline() const OVERRIDE; |
| 46 virtual int GetAverageCharacterWidth() const OVERRIDE; | 46 virtual int GetAverageCharacterWidth() const OVERRIDE; |
| 47 virtual int GetStringWidth(const string16& text) const OVERRIDE; | |
| 48 virtual int GetExpectedTextWidth(int length) const OVERRIDE; | 47 virtual int GetExpectedTextWidth(int length) const OVERRIDE; |
| 49 virtual int GetStyle() const OVERRIDE; | 48 virtual int GetStyle() const OVERRIDE; |
| 50 virtual std::string GetFontName() const OVERRIDE; | 49 virtual std::string GetFontName() const OVERRIDE; |
| 51 virtual int GetFontSize() const OVERRIDE; | 50 virtual int GetFontSize() const OVERRIDE; |
| 52 virtual NativeFont GetNativeFont() const OVERRIDE; | 51 virtual NativeFont GetNativeFont() const OVERRIDE; |
| 53 | 52 |
| 54 private: | 53 private: |
| 55 // 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 |
| 56 // from DeriveFont. | 55 // from DeriveFont. |
| 57 PlatformFontPango(SkTypeface* typeface, | 56 PlatformFontPango(SkTypeface* typeface, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 double underline_position_pixels_; | 102 double underline_position_pixels_; |
| 104 double underline_thickness_pixels_; | 103 double underline_thickness_pixels_; |
| 105 | 104 |
| 106 // The default font, used for the default constructor. | 105 // The default font, used for the default constructor. |
| 107 static Font* default_font_; | 106 static Font* default_font_; |
| 108 }; | 107 }; |
| 109 | 108 |
| 110 } // namespace gfx | 109 } // namespace gfx |
| 111 | 110 |
| 112 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_ | 111 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_ |
| OLD | NEW |