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

Unified Diff: ui/gfx/font.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
Index: ui/gfx/font.h
diff --git a/ui/gfx/font.h b/ui/gfx/font.h
index 5187ec44a3b90f7a509cb6010332a286d5df7200..2ab64b4f7c1261eb504e5c4f563be1f621d81424 100644
--- a/ui/gfx/font.h
+++ b/ui/gfx/font.h
@@ -69,17 +69,15 @@ class GFX_EXPORT Font {
// Returns the baseline, or ascent, of the font.
int GetBaseline() const;
- // Returns the average character width for the font.
- int GetAverageCharacterWidth() const;
+ // Returns the pixel width for the font.
msw 2013/10/01 19:14:53 nit: revert this comment change or update it to "/
jianli 2013/10/01 21:34:28 Done.
+ float GetAverageCharacterWidth() const;
- // Returns the number of horizontal pixels needed to display the specified
- // string.
- int GetStringWidth(const base::string16& text) const;
+ // Returns the pixel width needed to display the specified string.
+ 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 style of the font.
int GetStyle() const;

Powered by Google App Engine
This is Rietveld 408576698