| 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..745f35bd679eee45ad191e67bd47fb5174d7b816 100644
|
| --- a/ui/gfx/platform_font_win.cc
|
| +++ b/ui/gfx/platform_font_win.cc
|
| @@ -145,18 +145,18 @@ int PlatformFontWin::GetCapHeight() const {
|
| return font_ref_->cap_height();
|
| }
|
|
|
| -int PlatformFontWin::GetAverageCharacterWidth() const {
|
| +float PlatformFontWin::GetAverageCharacterWidth() const {
|
| return font_ref_->ave_char_width();
|
| }
|
|
|
| -int PlatformFontWin::GetStringWidth(const base::string16& text) const {
|
| +float PlatformFontWin::GetStringWidth(const base::string16& text) const {
|
| return Canvas::GetStringWidth(text,
|
| Font(const_cast<PlatformFontWin*>(this)));
|
| }
|
|
|
| -int PlatformFontWin::GetExpectedTextWidth(int length) const {
|
| - return length * std::min(font_ref_->GetDluBaseX(),
|
| - GetAverageCharacterWidth());
|
| +float PlatformFontWin::GetExpectedTextWidth(int length) const {
|
| + return length * std::min<float>(font_ref_->GetDluBaseX(),
|
| + GetAverageCharacterWidth());
|
| }
|
|
|
| int PlatformFontWin::GetStyle() const {
|
|
|