Index: ui/gfx/platform_font_pango.cc |
diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc |
index 856acc2c432a209b0e451bfa86c8883db92d7e90..2627f738b069f420ab8ec548203157bd3b61f904 100644 |
--- a/ui/gfx/platform_font_pango.cc |
+++ b/ui/gfx/platform_font_pango.cc |
@@ -192,17 +192,17 @@ int PlatformFontPango::GetCapHeight() const { |
return height_pixels_; |
} |
-int PlatformFontPango::GetAverageCharacterWidth() const { |
+float PlatformFontPango::GetAverageCharacterWidth() const { |
const_cast<PlatformFontPango*>(this)->InitPangoMetrics(); |
return SkScalarRound(average_width_pixels_); |
} |
-int PlatformFontPango::GetStringWidth(const base::string16& text) const { |
+float PlatformFontPango::GetStringWidth(const base::string16& text) const { |
return Canvas::GetStringWidth(text, |
Font(const_cast<PlatformFontPango*>(this))); |
} |
-int PlatformFontPango::GetExpectedTextWidth(int length) const { |
+float PlatformFontPango::GetExpectedTextWidth(int length) const { |
double char_width = const_cast<PlatformFontPango*>(this)->GetAverageWidth(); |
return round(static_cast<float>(length) * char_width); |
} |