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

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 trybots 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
Index: ui/gfx/font_list.h
diff --git a/ui/gfx/font_list.h b/ui/gfx/font_list.h
index 2c47f4ca1a479b9d78f66c6c2a4c5ea09e20d948..d2508f9f3ed708d9c0cf92360ff554e7649b6b95 100644
--- a/ui/gfx/font_list.h
+++ b/ui/gfx/font_list.h
@@ -88,6 +88,10 @@ class GFX_EXPORT FontList {
// 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|. Note that the fractional
+ // width might be returned in some platforms.
+ float GetStringWidthF(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.

Powered by Google App Engine
This is Rietveld 408576698