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

Unified Diff: app/gfx/font_mac.mm

Issue 344008: Implemented most of HtmlDialogWindowController, which is a Cocoa port (Closed)
Patch Set: Added TODOs. Created 11 years, 2 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 | chrome/browser/cocoa/browser_command_executor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/font_mac.mm
diff --git a/app/gfx/font_mac.mm b/app/gfx/font_mac.mm
index b39ebea3cf106c2377b60eabc89216d6085c1938..4d0a48ed8bc898466a7042f1023600b455066290 100644
--- a/app/gfx/font_mac.mm
+++ b/app/gfx/font_mac.mm
@@ -33,6 +33,9 @@ Font::Font()
void Font::calculateMetrics() {
NSFont* font = nativeFont();
+ // TODO(akalin): This is the wrong height to use! Use either the height
+ // of the bounding rect for the font or ascender - descender; this needs
+ // further investigation. Width may be wrong, too.
height_ = [font xHeight];
ascent_ = [font ascender];
avg_width_ = [font boundingRectForGlyph:[font glyphWithName:@"x"]].size.width;
« no previous file with comments | « no previous file | chrome/browser/cocoa/browser_command_executor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698