| Index: ui/gfx/platform_font_pango.cc
|
| diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
|
| index 0ddf363c3f733937799649d63d967b95c16e36bc..d079bc55b55024a487096efec4bc799b4d91f38d 100644
|
| --- a/ui/gfx/platform_font_pango.cc
|
| +++ b/ui/gfx/platform_font_pango.cc
|
| @@ -182,17 +182,17 @@ int PlatformFontPango::GetBaseline() const {
|
| return ascent_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);
|
| }
|
|
|