|
Lines 545-551
void FontCache::getTraitsInFamily(const AtomicString& familyName, Vector<unsigne
a/Source/WebCore/platform/graphics/win/FontCacheWin.cpp_sec1
|
| 545 |
copyToVector(procData.m_traitsMasks, traitsMasks); |
545 |
copyToVector(procData.m_traitsMasks, traitsMasks); |
| 546 |
} |
546 |
} |
| 547 |
|
547 |
|
| 548 |
PassOwnPtr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family) |
548 |
std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family) |
| 549 |
{ |
549 |
{ |
| 550 |
bool isLucidaGrande = false; |
550 |
bool isLucidaGrande = false; |
| 551 |
static AtomicString lucidaStr("Lucida Grande"); |
551 |
static AtomicString lucidaStr("Lucida Grande"); |
|
Lines 574-580
PassOwnPtr<FontPlatformData> FontCache::createFontPlatformData(const FontDescrip
a/Source/WebCore/platform/graphics/win/FontCacheWin.cpp_sec2
|
| 574 |
bool synthesizeBold = isGDIFontWeightBold(weight) && !isGDIFontWeightBold(logFont.lfWeight); |
574 |
bool synthesizeBold = isGDIFontWeightBold(weight) && !isGDIFontWeightBold(logFont.lfWeight); |
| 575 |
bool synthesizeItalic = fontDescription.italic() && !logFont.lfItalic; |
575 |
bool synthesizeItalic = fontDescription.italic() && !logFont.lfItalic; |
| 576 |
|
576 |
|
| 577 |
FontPlatformData* result = new FontPlatformData(WTF::move(hfont), fontDescription.computedPixelSize(), synthesizeBold, synthesizeItalic, useGDI); |
577 |
auto result = std::make_unique<FontPlatformData>(WTF::move(hfont), fontDescription.computedPixelSize(), synthesizeBold, synthesizeItalic, useGDI); |
| 578 |
|
578 |
|
| 579 |
#if USE(CG) |
579 |
#if USE(CG) |
| 580 |
bool fontCreationFailed = !result->cgFont(); |
580 |
bool fontCreationFailed = !result->cgFont(); |
|
Lines 586-596
PassOwnPtr<FontPlatformData> FontCache::createFontPlatformData(const FontDescrip
a/Source/WebCore/platform/graphics/win/FontCacheWin.cpp_sec3
|
| 586 |
// The creation of the CGFontRef failed for some reason. We already asserted in debug builds, but to make |
586 |
// The creation of the CGFontRef failed for some reason. We already asserted in debug builds, but to make |
| 587 |
// absolutely sure that we don't use this font, go ahead and return 0 so that we can fall back to the next |
587 |
// absolutely sure that we don't use this font, go ahead and return 0 so that we can fall back to the next |
| 588 |
// font. |
588 |
// font. |
| 589 |
delete result; |
|
|
| 590 |
return nullptr; |
589 |
return nullptr; |
| 591 |
} |
590 |
} |
| 592 |
|
591 |
|
| 593 |
return adoptPtr(result); |
592 |
return result; |
| 594 |
} |
593 |
} |
| 595 |
|
594 |
|
| 596 |
} |
595 |
} |