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

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

Issue 2222153002: Fix synthetic bolding of system fonts on Linux/Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const FontFaceCreationParams& creationParams, float fontSize) 204 const FontFaceCreationParams& creationParams, float fontSize)
205 { 205 {
206 CString name; 206 CString name;
207 RefPtr<SkTypeface> tf(createTypeface(fontDescription, creationParams, name)) ; 207 RefPtr<SkTypeface> tf(createTypeface(fontDescription, creationParams, name)) ;
208 if (!tf) 208 if (!tf)
209 return nullptr; 209 return nullptr;
210 210
211 return wrapUnique(new FontPlatformData(tf, 211 return wrapUnique(new FontPlatformData(tf,
212 name.data(), 212 name.data(),
213 fontSize, 213 fontSize,
214 (fontDescription.weight() > 200 + tf->fontStyle().weight()) || fontDescr iption.isSyntheticBold(), 214 (numericFontWeight(fontDescription.weight()) > 200 + tf->fontStyle().wei ght()) || fontDescription.isSyntheticBold(),
215 ((fontDescription.style() == FontStyleItalic || fontDescription.style() == FontStyleOblique) && !tf->isItalic()) || fontDescription.isSyntheticItalic(), 215 ((fontDescription.style() == FontStyleItalic || fontDescription.style() == FontStyleOblique) && !tf->isItalic()) || fontDescription.isSyntheticItalic(),
216 fontDescription.orientation())); 216 fontDescription.orientation()));
217 } 217 }
218 #endif // !OS(WIN) 218 #endif // !OS(WIN)
219 219
220 } // namespace blink 220 } // 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