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

Unified Diff: gfx/canvas_skia_mac.mm

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | « gfx/canvas_skia_linux.cc ('k') | gfx/canvas_skia_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/canvas_skia_mac.mm
===================================================================
--- gfx/canvas_skia_mac.mm (revision 55911)
+++ gfx/canvas_skia_mac.mm (working copy)
@@ -28,14 +28,14 @@
void CanvasSkia::SizeStringInt(const std::wstring& text,
const gfx::Font& font,
int *width, int *height, int flags) {
- NSFont* native_font = font.nativeFont();
+ NSFont* native_font = font.GetNativeFont();
NSString* ns_string = base::SysWideToNSString(text);
NSDictionary* attributes =
[NSDictionary dictionaryWithObject:native_font
forKey:NSFontAttributeName];
NSSize string_size = [ns_string sizeWithAttributes:attributes];
*width = string_size.width;
- *height = font.height();
+ *height = font.GetHeight();
}
void CanvasSkia::DrawStringInt(const std::wstring& text, const gfx::Font& font,
@@ -59,7 +59,7 @@
NSDictionary* attributes =
[NSDictionary dictionaryWithObjectsAndKeys:
- font.nativeFont(), NSFontAttributeName,
+ font.GetNativeFont(), NSFontAttributeName,
ns_color, NSForegroundColorAttributeName,
ns_style, NSParagraphStyleAttributeName,
nil];
« no previous file with comments | « gfx/canvas_skia_linux.cc ('k') | gfx/canvas_skia_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698