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

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

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix round-down problems Created 7 years, 2 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
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 GetCapHeight() const OVERRIDE; 52 virtual int GetCapHeight() const OVERRIDE;
53 virtual int GetAverageCharacterWidth() const OVERRIDE; 53 virtual float GetAverageCharacterWidth() const OVERRIDE;
54 virtual int GetStringWidth(const base::string16& text) const OVERRIDE; 54 virtual float GetStringWidth(const base::string16& text) const OVERRIDE;
55 virtual int GetExpectedTextWidth(int length) const OVERRIDE; 55 virtual float GetExpectedTextWidth(int length) const OVERRIDE;
56 virtual int GetStyle() const OVERRIDE; 56 virtual int GetStyle() const OVERRIDE;
57 virtual std::string GetFontName() const OVERRIDE; 57 virtual std::string GetFontName() const OVERRIDE;
58 virtual int GetFontSize() const OVERRIDE; 58 virtual int GetFontSize() const OVERRIDE;
59 virtual NativeFont GetNativeFont() const OVERRIDE; 59 virtual NativeFont GetNativeFont() const OVERRIDE;
60 60
61 private: 61 private:
62 // Create a new instance of this object with the specified properties. Called 62 // Create a new instance of this object with the specified properties. Called
63 // from DeriveFont. 63 // from DeriveFont.
64 PlatformFontPango(const skia::RefPtr<SkTypeface>& typeface, 64 PlatformFontPango(const skia::RefPtr<SkTypeface>& typeface,
65 const std::string& name, 65 const std::string& name,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #if defined(OS_CHROMEOS) 117 #if defined(OS_CHROMEOS)
118 static std::string* default_font_description_; 118 static std::string* default_font_description_;
119 #endif 119 #endif
120 120
121 DISALLOW_COPY_AND_ASSIGN(PlatformFontPango); 121 DISALLOW_COPY_AND_ASSIGN(PlatformFontPango);
122 }; 122 };
123 123
124 } // namespace gfx 124 } // namespace gfx
125 125
126 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_ 126 #endif // UI_GFX_PLATFORM_FONT_PANGO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698