| Index: ui/gfx/platform_font_win.cc
|
| diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
|
| index a97da2eedcf1ad9e2ecafb5e748a1bb33675b3a6..e9fee49904c633c7f7cd2c5a5bfdb00f68776ada 100644
|
| --- a/ui/gfx/platform_font_win.cc
|
| +++ b/ui/gfx/platform_font_win.cc
|
| @@ -19,6 +19,7 @@
|
| #include "base/win/win_util.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/font.h"
|
| +#include "ui/gfx/font_list.h"
|
| #include "ui/gfx/win/scoped_set_map_mode.h"
|
|
|
| namespace {
|
| @@ -154,6 +155,11 @@ int PlatformFontWin::GetStringWidth(const base::string16& text) const {
|
| Font(const_cast<PlatformFontWin*>(this)));
|
| }
|
|
|
| +float PlatformFontWin::GetStringWidthF(const base::string16& text) const {
|
| + return Canvas::GetStringWidthF(
|
| + text, FontList(Font(const_cast<PlatformFontWin*>(this))));
|
| +}
|
| +
|
| int PlatformFontWin::GetExpectedTextWidth(int length) const {
|
| return length * std::min(font_ref_->GetDluBaseX(),
|
| GetAverageCharacterWidth());
|
|
|