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

Unified Diff: ui/gfx/text_utils.h

Issue 24883002: Uses and returns the fractional width in text eliding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync 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
« no previous file with comments | « ui/gfx/text_elider_unittest.cc ('k') | ui/gfx/text_utils_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/text_utils.h
diff --git a/ui/gfx/text_utils.h b/ui/gfx/text_utils.h
index fa5caef2db6f0a879f4cd3e45c1d753d197de820..088f97cea9e6077ce461f40c3cfcad97a51d3ed1 100644
--- a/ui/gfx/text_utils.h
+++ b/ui/gfx/text_utils.h
@@ -27,6 +27,10 @@ GFX_EXPORT base::string16 RemoveAcceleratorChar(const base::string16& s,
GFX_EXPORT int GetStringWidth(const base::string16& text,
const FontList& font_list);
+// This is same as GetStringWidth except that fractional width is returned.
+GFX_EXPORT float GetStringWidthF(const base::string16& text,
+ const FontList& font_list);
+
} // namespace gfx
#endif // UI_GFX_TEXT_UTILS_H_
« no previous file with comments | « ui/gfx/text_elider_unittest.cc ('k') | ui/gfx/text_utils_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698