OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |