| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 bool syntheticItalic = ((traits & NSFontItalicTrait) && !(actualTraits & NSF
ontItalicTrait)) || fontDescription.isSyntheticItalic(); | 229 bool syntheticItalic = ((traits & NSFontItalicTrait) && !(actualTraits & NSF
ontItalicTrait)) || fontDescription.isSyntheticItalic(); |
| 230 | 230 |
| 231 // FontPlatformData::typeface() is null in the case of Chromium out-of-proce
ss font loading failing. | 231 // FontPlatformData::typeface() is null in the case of Chromium out-of-proce
ss font loading failing. |
| 232 // Out-of-process loading occurs for registered fonts stored in non-system l
ocations. | 232 // Out-of-process loading occurs for registered fonts stored in non-system l
ocations. |
| 233 // When loading fails, we do not want to use the returned FontPlatformData s
ince it will not have | 233 // When loading fails, we do not want to use the returned FontPlatformData s
ince it will not have |
| 234 // a valid SkTypeface. | 234 // a valid SkTypeface. |
| 235 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo
rmFont, size, syntheticBold, syntheticItalic, fontDescription.orientation())); | 235 OwnPtr<FontPlatformData> platformData = adoptPtr(new FontPlatformData(platfo
rmFont, size, syntheticBold, syntheticItalic, fontDescription.orientation())); |
| 236 if (!platformData->typeface()) { | 236 if (!platformData->typeface()) { |
| 237 return nullptr; | 237 return nullptr; |
| 238 } | 238 } |
| 239 return platformData.release(); | 239 return platformData; |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace blink | 242 } // namespace blink |
| OLD | NEW |