Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: ui/gfx/platform_font_pango.h

Issue 9117009: Move |PlatformFont::GetStringWidth()| implementation up into font.cc directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/platform_font_mac.mm ('k') | ui/gfx/platform_font_pango.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_mac.mm ('k') | ui/gfx/platform_font_pango.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698