| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 3 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
| 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 #if !OS(WIN) | 251 #if !OS(WIN) |
| 252 std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData( | 252 std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData( |
| 253 const FontDescription& fontDescription, | 253 const FontDescription& fontDescription, |
| 254 const FontFaceCreationParams& creationParams, | 254 const FontFaceCreationParams& creationParams, |
| 255 float fontSize) { | 255 float fontSize) { |
| 256 CString name; | 256 CString name; |
| 257 sk_sp<SkTypeface> tf = createTypeface(fontDescription, creationParams, name); | 257 sk_sp<SkTypeface> tf = createTypeface(fontDescription, creationParams, name); |
| 258 if (!tf) | 258 if (!tf) |
| 259 return nullptr; | 259 return nullptr; |
| 260 | 260 |
| 261 return wrapUnique(new FontPlatformData( | 261 return WTF::wrapUnique(new FontPlatformData( |
| 262 tf, name.data(), fontSize, (numericFontWeight(fontDescription.weight()) > | 262 tf, name.data(), fontSize, (numericFontWeight(fontDescription.weight()) > |
| 263 200 + tf->fontStyle().weight()) || | 263 200 + tf->fontStyle().weight()) || |
| 264 fontDescription.isSyntheticBold(), | 264 fontDescription.isSyntheticBold(), |
| 265 ((fontDescription.style() == FontStyleItalic || | 265 ((fontDescription.style() == FontStyleItalic || |
| 266 fontDescription.style() == FontStyleOblique) && | 266 fontDescription.style() == FontStyleOblique) && |
| 267 !tf->isItalic()) || | 267 !tf->isItalic()) || |
| 268 fontDescription.isSyntheticItalic(), | 268 fontDescription.isSyntheticItalic(), |
| 269 fontDescription.orientation())); | 269 fontDescription.orientation())); |
| 270 } | 270 } |
| 271 #endif // !OS(WIN) | 271 #endif // !OS(WIN) |
| 272 | 272 |
| 273 } // namespace blink | 273 } // namespace blink |
| OLD | NEW |