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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData( 261 std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(
262 const FontDescription& fontDescription, 262 const FontDescription& fontDescription,
263 const FontFaceCreationParams& creationParams, 263 const FontFaceCreationParams& creationParams,
264 float fontSize, 264 float fontSize,
265 AlternateFontName) { 265 AlternateFontName) {
266 CString name; 266 CString name;
267 sk_sp<SkTypeface> tf = createTypeface(fontDescription, creationParams, name); 267 sk_sp<SkTypeface> tf = createTypeface(fontDescription, creationParams, name);
268 if (!tf) 268 if (!tf)
269 return nullptr; 269 return nullptr;
270 270
271 return WTF::wrapUnique(new FontPlatformData( 271 return WTF::wrapUnique(
272 tf, name.data(), fontSize, (numericFontWeight(fontDescription.weight()) > 272 new FontPlatformData(tf, name.data(), fontSize,
273 200 + tf->fontStyle().weight()) || 273 (numericFontWeight(fontDescription.weight()) >
274 fontDescription.isSyntheticBold(), 274 200 + tf->fontStyle().weight()) ||
275 ((fontDescription.style() == FontStyleItalic || 275 fontDescription.isSyntheticBold(),
276 fontDescription.style() == FontStyleOblique) && 276 ((fontDescription.style() == FontStyleItalic ||
277 !tf->isItalic()) || 277 fontDescription.style() == FontStyleOblique) &&
278 fontDescription.isSyntheticItalic(), 278 !tf->isItalic()) ||
279 fontDescription.orientation())); 279 fontDescription.isSyntheticItalic(),
280 fontDescription.orientation()));
280 } 281 }
281 #endif // !OS(WIN) 282 #endif // !OS(WIN)
282 283
283 } // namespace blink 284 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698