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

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: More fixes per feedback plus new tests Created 7 years, 3 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/font.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 96398a1dcd0118781aa94d3caea4d35796955974..5a15e6e3473980cef8bb4de959bb842ad1189965 100644
--- a/ui/gfx/font_list.h
+++ b/ui/gfx/font_list.h
@@ -81,13 +81,12 @@ class GFX_EXPORT FontList {
// fonts in the font list.
int GetBaseline() 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/font.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