| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |