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

Unified Diff: ui/gfx/font_list.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 side-by-side diff with in-line comments
Download patch
« ui/gfx/canvas.h ('K') | « ui/gfx/font.cc ('k') | ui/gfx/font_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_list.h
diff --git a/ui/gfx/font_list.h b/ui/gfx/font_list.h
index 2c47f4ca1a479b9d78f66c6c2a4c5ea09e20d948..1acccb6cefc84d475f19e78c2f34d15cf5049d53 100644
--- a/ui/gfx/font_list.h
+++ b/ui/gfx/font_list.h
@@ -85,13 +85,12 @@ class GFX_EXPORT FontList {
// Currently returns the cap height of the primary font.
int GetCapHeight() const;
- // Returns the number of horizontal pixels needed to display |text|.
- int GetStringWidth(const base::string16& text) const;
+ // Returns the pixel width needed to display |text|.
+ float GetStringWidth(const base::string16& text) const;
- // Returns the expected number of horizontal pixels needed to display the
- // specified length of characters. Call GetStringWidth() to retrieve the
- // actual number.
- int GetExpectedTextWidth(int length) const;
+ // Returns the expected pixel width needed to display the specified length of
+ // characters. Call GetStringWidth() to retrieve the actual number.
+ float GetExpectedTextWidth(int length) const;
// Returns the |gfx::Font::FontStyle| style flags for this font list.
int GetFontStyle() const;
« ui/gfx/canvas.h ('K') | « ui/gfx/font.cc ('k') | ui/gfx/font_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698