OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. | 2 * Copyright (C) 2006, 2007 Apple Computer, Inc. |
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. | 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 365 |
366 } else { | 366 } else { |
367 return 0; | 367 return 0; |
368 } | 368 } |
369 } | 369 } |
370 | 370 |
371 FontPlatformData* result = new FontPlatformData(tf, | 371 FontPlatformData* result = new FontPlatformData(tf, |
372 name.data(), | 372 name.data(), |
373 fontSize, | 373 fontSize, |
374 (fontDescription.weight() >= FontWeight600 && !tf->isBold()) || fontDesc
ription.isSyntheticBold(), | 374 (fontDescription.weight() >= FontWeight600 && !tf->isBold()) || fontDesc
ription.isSyntheticBold(), |
375 (fontDescription.style() == FontStyleItalic && !tf->isItalic()) || fontD
escription.isSyntheticItalic(), | 375 ((fontDescription.style() == FontStyleItalic || fontDescription.style()
== FontStyleOblique) && !tf->isItalic()) || fontDescription.isSyntheticItalic(), |
376 fontDescription.orientation(), | 376 fontDescription.orientation(), |
377 s_useSubpixelPositioning); | 377 s_useSubpixelPositioning); |
378 | 378 |
379 struct FamilyMinSize { | 379 struct FamilyMinSize { |
380 const wchar_t* family; | 380 const wchar_t* family; |
381 unsigned minSize; | 381 unsigned minSize; |
382 }; | 382 }; |
383 const static FamilyMinSize minAntiAliasSizeForFont[] = { | 383 const static FamilyMinSize minAntiAliasSizeForFont[] = { |
384 { L"simsun", 11 }, | 384 { L"simsun", 11 }, |
385 { L"dotum", 12 }, | 385 { L"dotum", 12 }, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 if (typefacesMatchesFamily(tf.get(), family)) { | 419 if (typefacesMatchesFamily(tf.get(), family)) { |
420 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); | 420 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); |
421 break; | 421 break; |
422 } | 422 } |
423 } | 423 } |
424 | 424 |
425 return result; | 425 return result; |
426 } | 426 } |
427 | 427 |
428 } // namespace blink | 428 } // namespace blink |
OLD | NEW |