Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: ui/gfx/platform_font_ios.mm

Issue 463333002: Update iOS deployment target to 7.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gfx/platform_font_ios.mm
diff --git a/ui/gfx/platform_font_ios.mm b/ui/gfx/platform_font_ios.mm
index 03f5ddbe75a6e986c4f8d2770369d96a60ba53fe..db72c4f5f03781db016c8979bb813525ea1ae1a4 100644
--- a/ui/gfx/platform_font_ios.mm
+++ b/ui/gfx/platform_font_ios.mm
@@ -110,7 +110,8 @@ void PlatformFontIOS::CalculateMetrics() {
height_ = font.lineHeight;
ascent_ = font.ascender;
cap_height_ = font.capHeight;
- average_width_ = [@"x" sizeWithFont:font].width;
+ NSDictionary* attributes = @{ NSFontAttributeName : font };
+ average_width_ = ceilf([@"x" sizeWithAttributes:attributes].width);
sdefresne 2014/08/13 09:30:37 nit: why not use std::ceil from <cmath> and avoid
stuartmorgan 2014/08/13 14:07:35 Good call; done.
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « build/common.gypi ('k') | ui/gfx/text_utils_ios.mm » ('j') | ui/gfx/text_utils_ios.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698