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

Side by Side Diff: chrome/common/font_descriptor_mac.mm

Issue 2804001: Mac: More pluming for OOP font loading (Closed)
Patch Set: Fix review comments Created 10 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/common/font_descriptor_mac.h"
6
7 #include <Cocoa/Cocoa.h>
8
9 #include "base/sys_string_conversions.h"
10
11 FontDescriptor::FontDescriptor(NSFont* font) {
12 font_name = base::SysNSStringToUTF16([font fontName]);
13 font_point_size = [font pointSize];
14 }
15
16 NSFont* FontDescriptor::nsFont() const {
17 NSString* font_name_ns = base::SysUTF16ToNSString(font_name);
18 NSFont* font = [NSFont fontWithName:font_name_ns size:font_point_size];
19 return font;
20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698