Index: ui/gfx/font.h |
diff --git a/ui/gfx/font.h b/ui/gfx/font.h |
index 020ab64f744e1d807aaa404ddbf6bc046d218f3a..398eda363770b75a5d292a8170be4acbe2bc4408 100644 |
--- a/ui/gfx/font.h |
+++ b/ui/gfx/font.h |
@@ -79,6 +79,10 @@ class GFX_EXPORT Font { |
// string. |
int GetStringWidth(const base::string16& text) const; |
+ // Returns the pixel width needed to display the specified string. Note that |
+ // the fractional width might be returned in some platforms. |
+ float GetStringWidthF(const base::string16& text) const; |
Alexei Svitkine (slow)
2013/10/07 21:43:39
Is this actually needed? Does someone need to use
jianli
2013/10/07 23:18:45
Done.
|
+ |
// Returns the expected number of horizontal pixels needed to display the |
// specified length of characters. Call GetStringWidth() to retrieve the |
// actual number. |