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

Side by Side Diff: webkit/support/platform_support_mac.mm

Issue 10893031: Register WebKitWeightWatcher fonts again on mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/support/platform_support.h" 5 #include "webkit/support/platform_support.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 #include <AvailabilityMacros.h> 8 #include <AvailabilityMacros.h>
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 #import <objc/objc-runtime.h> 10 #import <objc/objc-runtime.h>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 if (!g_resource_data_pack->LoadFromPath(resources_pak_path)) { 117 if (!g_resource_data_pack->LoadFromPath(resources_pak_path)) {
118 LOG(FATAL) << "failed to load DumpRenderTree.pak"; 118 LOG(FATAL) << "failed to load DumpRenderTree.pak";
119 } 119 }
120 120
121 if (unit_test_mode) 121 if (unit_test_mode)
122 return; 122 return;
123 123
124 // Load font files in the resource folder. 124 // Load font files in the resource folder.
125 static const char* const fontFileNames[] = { 125 static const char* const fontFileNames[] = {
126 "AHEM____.TTF", 126 "AHEM____.TTF",
127 // We don't register WebKitWeightWather fonts because of 127 "WebKitWeightWatcher100.ttf",
128 // webkit.org/b/50709. 128 "WebKitWeightWatcher200.ttf",
129 "WebKitWeightWatcher300.ttf",
130 "WebKitWeightWatcher400.ttf",
131 "WebKitWeightWatcher500.ttf",
132 "WebKitWeightWatcher600.ttf",
133 "WebKitWeightWatcher700.ttf",
134 "WebKitWeightWatcher800.ttf",
135 "WebKitWeightWatcher900.ttf",
129 }; 136 };
130 137
131 NSMutableArray* font_urls = [NSMutableArray array]; 138 NSMutableArray* font_urls = [NSMutableArray array];
132 NSURL* resources_directory = [[NSBundle mainBundle] resourceURL]; 139 NSURL* resources_directory = [[NSBundle mainBundle] resourceURL];
133 for (unsigned i = 0; i < arraysize(fontFileNames); ++i) { 140 for (unsigned i = 0; i < arraysize(fontFileNames); ++i) {
134 NSURL* font_url = [resources_directory 141 NSURL* font_url = [resources_directory
135 URLByAppendingPathComponent:[NSString 142 URLByAppendingPathComponent:[NSString
136 stringWithUTF8String:fontFileNames[i]]]; 143 stringWithUTF8String:fontFileNames[i]]];
137 [font_urls addObject:[font_url absoluteURL]]; 144 [font_urls addObject:[font_url absoluteURL]];
138 } 145 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 245 }
239 } 246 }
240 return resize_corner_data; 247 return resize_corner_data;
241 } 248 }
242 } 249 }
243 base::StringPiece res; 250 base::StringPiece res;
244 if (g_resource_data_pack) 251 if (g_resource_data_pack)
245 g_resource_data_pack->GetStringPiece(resource_id, &res); 252 g_resource_data_pack->GetStringPiece(resource_id, &res);
246 return res; 253 return res;
247 } 254 }
OLDNEW
« 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