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

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

Issue 2229913002: Fix synthetic bolding of system fonts on Linux/Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (c) 2006, 2007, 2008, 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 const FontFaceCreationParams& creationParams, float fontSize) 207 const FontFaceCreationParams& creationParams, float fontSize)
208 { 208 {
209 CString name; 209 CString name;
210 RefPtr<SkTypeface> tf(createTypeface(fontDescription, creationParams, name)) ; 210 RefPtr<SkTypeface> tf(createTypeface(fontDescription, creationParams, name)) ;
211 if (!tf) 211 if (!tf)
212 return nullptr; 212 return nullptr;
213 213
214 return wrapUnique(new FontPlatformData(tf, 214 return wrapUnique(new FontPlatformData(tf,
215 name.data(), 215 name.data(),
216 fontSize, 216 fontSize,
217 (fontDescription.weight() > 200 + tf->fontStyle().weight()) || fontDescr iption.isSyntheticBold(), 217 (numericFontWeight(fontDescription.weight()) > 200 + tf->fontStyle().wei ght()) || fontDescription.isSyntheticBold(),
218 ((fontDescription.style() == FontStyleItalic || fontDescription.style() == FontStyleOblique) && !tf->isItalic()) || fontDescription.isSyntheticItalic(), 218 ((fontDescription.style() == FontStyleItalic || fontDescription.style() == FontStyleOblique) && !tf->isItalic()) || fontDescription.isSyntheticItalic(),
219 fontDescription.orientation())); 219 fontDescription.orientation()));
220 } 220 }
221 #endif // !OS(WIN) 221 #endif // !OS(WIN)
222 222
223 } // namespace blink 223 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698