Esempio n. 1
0
PassRefPtr<SimpleFontData> SimpleFontData::nonSyntheticItalicFontData() const
{
    if (!m_derivedFontData)
        m_derivedFontData = DerivedFontData::create(isCustomFont());
    if (!m_derivedFontData->nonSyntheticItalic) {
        FontPlatformData nonSyntheticItalicFontPlatformData(m_platformData);
#if PLATFORM(MAC)
        nonSyntheticItalicFontPlatformData.m_syntheticOblique = false;
#endif
        m_derivedFontData->nonSyntheticItalic = create(nonSyntheticItalicFontPlatformData, isCustomFont(), false, true);
    }
    return m_derivedFontData->nonSyntheticItalic;
}
Esempio n. 2
0
PassRefPtr<Font> Font::nonSyntheticItalicFont() const
{
    if (!m_derivedFontData)
        m_derivedFontData = std::make_unique<DerivedFontData>(isCustomFont());
    if (!m_derivedFontData->nonSyntheticItalic) {
        FontPlatformData nonSyntheticItalicFontPlatformData(m_platformData);
#if PLATFORM(COCOA) || USE(CAIRO)
        nonSyntheticItalicFontPlatformData.setSyntheticOblique(false);
#endif
        m_derivedFontData->nonSyntheticItalic = create(nonSyntheticItalicFontPlatformData, isCustomFont());
    }
    ASSERT(m_derivedFontData->nonSyntheticItalic != this);
    return m_derivedFontData->nonSyntheticItalic;
}