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

Unified Diff: ui/gfx/platform_font_mac.mm

Issue 445363006: MacViews: Fix vertical alignment of text rendering. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_mac.mm
diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm
index 4db4baddd82fbf6cc49635ab317a22d4928aeb56..bec41f74882bb7627a1a8479086fc2b02aab5b2d 100644
--- a/ui/gfx/platform_font_mac.mm
+++ b/ui/gfx/platform_font_mac.mm
@@ -166,9 +166,9 @@ void PlatformFontMac::CalculateMetrics() {
base::scoped_nsobject<NSLayoutManager> layout_manager(
[[NSLayoutManager alloc] init]);
- height_ = [layout_manager defaultLineHeightForFont:font];
- ascent_ = [font ascender];
- cap_height_ = [font capHeight];
+ height_ = SkScalarCeilToInt([layout_manager defaultLineHeightForFont:font]);
+ ascent_ = SkScalarCeilToInt([font ascender]);
+ cap_height_ = SkScalarCeilToInt([font capHeight]);
average_width_ =
NSWidth([font boundingRectForGlyph:[font glyphWithName:@"x"]]);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698