OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 fontDescription.isSyntheticBold(); | 274 fontDescription.isSyntheticBold(); |
275 | 275 |
276 bool syntheticItalic = | 276 bool syntheticItalic = |
277 ((traits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait)) || | 277 ((traits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait)) || |
278 fontDescription.isSyntheticItalic(); | 278 fontDescription.isSyntheticItalic(); |
279 | 279 |
280 // FontPlatformData::typeface() is null in the case of Chromium out-of-process | 280 // FontPlatformData::typeface() is null in the case of Chromium out-of-process |
281 // font loading failing. Out-of-process loading occurs for registered fonts | 281 // font loading failing. Out-of-process loading occurs for registered fonts |
282 // stored in non-system locations. When loading fails, we do not want to use | 282 // stored in non-system locations. When loading fails, we do not want to use |
283 // the returned FontPlatformData since it will not have a valid SkTypeface. | 283 // the returned FontPlatformData since it will not have a valid SkTypeface. |
284 std::unique_ptr<FontPlatformData> platformData = wrapUnique( | 284 std::unique_ptr<FontPlatformData> platformData = WTF::wrapUnique( |
285 new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, | 285 new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic, |
286 fontDescription.orientation())); | 286 fontDescription.orientation())); |
287 if (!platformData->typeface()) { | 287 if (!platformData->typeface()) { |
288 return nullptr; | 288 return nullptr; |
289 } | 289 } |
290 return platformData; | 290 return platformData; |
291 } | 291 } |
292 | 292 |
293 } // namespace blink | 293 } // namespace blink |
OLD | NEW |