Index: ui/gfx/platform_font_win.cc |
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc |
index 2d4c006f2683e94cec8821df7bb897615712fd28..b9de1f4a5675402c5fe9d76031d8bf7db2f281b0 100644 |
--- a/ui/gfx/platform_font_win.cc |
+++ b/ui/gfx/platform_font_win.cc |
@@ -141,18 +141,18 @@ int PlatformFontWin::GetBaseline() const { |
return font_ref_->baseline(); |
} |
-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 { |