| Index: ui/gfx/text_utils_ios.mm
|
| diff --git a/ui/gfx/text_utils_ios.mm b/ui/gfx/text_utils_ios.mm
|
| index 56c01df7f554371671427b60dde2480ee4efaf2a..304f9ff67bca43bcb2cd35b4f2cbd71496510b9e 100644
|
| --- a/ui/gfx/text_utils_ios.mm
|
| +++ b/ui/gfx/text_utils_ios.mm
|
| @@ -20,7 +20,8 @@ int GetStringWidth(const base::string16& text, const FontList& font_list) {
|
| float GetStringWidthF(const base::string16& text, const FontList& font_list) {
|
| NSString* ns_text = base::SysUTF16ToNSString(text);
|
| NativeFont native_font = font_list.GetPrimaryFont().GetNativeFont();
|
| - return [ns_text sizeWithFont:native_font].width;
|
| + NSDictionary* attributes = @{ NSFontAttributeName : native_font };
|
| + return std::ceil([ns_text sizeWithAttributes:attributes].width);
|
| }
|
|
|
| } // namespace gfx
|
|
|