Changeset 248748 in webkit


Ignore:
Timestamp:
Aug 15, 2019 2:49:01 PM (5 years ago)
Author:
Brent Fulgham
Message:

[FTW] Support web fonts
https://bugs.webkit.org/show_bug.cgi?id=200771
<rdar://problem/54350291>

Reviewed by Dean Jackson.

The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite.

This patch does the following:

  1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we can share code in more places.
  2. After adding the font to GDI, it adds the font information to the DirectWrite font cache.
  3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used for downloaded fonts.
  • PlatformFTW.cmake: Add DirectWriteUtilities.cpp
  • css/CSSFontFaceSource.cpp:
  • loader/cache/CachedFont.cpp:
  • loader/cache/CachedSVGFont.cpp:
  • platform/graphics/Font.cpp:
  • platform/graphics/Font.h:
  • platform/graphics/FontCache.cpp:
  • platform/graphics/FontPlatformData.cpp:
  • platform/graphics/FontPlatformData.h:
  • platform/graphics/opentype/OpenTypeUtilities.cpp:

(WebCore::renameAndActivateFont):

  • platform/graphics/win/DirectWriteUtilities.cpp: Added.
  • platform/graphics/win/DirectWriteUtilities.h: Added.
  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::createGDIFont):

  • platform/graphics/win/FontCascadeDirect2D.cpp:
  • platform/graphics/win/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData):

  • platform/graphics/win/FontPlatformDataDirect2D.cpp:

(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::createFallbackFont):

  • platform/graphics/win/FontPlatformDataWin.cpp:
  • platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:

(WebCore::GlyphPage::fill):

  • platform/graphics/win/GraphicsContextDirect2D.cpp:
  • platform/graphics/win/SimpleFontDataDirect2D.cpp:

(WebCore::Font::systemDWriteFactory): Deleted.
(WebCore::Font::systemDWriteGdiInterop): Deleted.

  • platform/graphics/win/SimpleFontDataWin.cpp:
Location:
trunk/Source/WebCore
Files:
2 added
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r248747 r248748  
     12019-08-15  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [FTW] Support web fonts
     4        https://bugs.webkit.org/show_bug.cgi?id=200771
     5        <rdar://problem/54350291>
     6
     7        Reviewed by Dean Jackson.
     8
     9        The current code path for handling web fonts uses 'AddFontMemResourceEx'. Unfortunately, this only updates the font caches used by GDI, and is not exposed to DirectWrite.
     10
     11        This patch does the following:
     12        1. Moves some code into a new DirectWriteUtilities file, similar to how Direct2D is handled, so we
     13           can share code in more places.
     14        2. After adding the font to GDI, it adds the font information to the DirectWrite font cache.
     15        3. Add logic to check the overall system DirectWrite fonts, as well as the custom font cache used
     16           for downloaded fonts.
     17
     18        * PlatformFTW.cmake: Add DirectWriteUtilities.cpp
     19        * css/CSSFontFaceSource.cpp:
     20        * loader/cache/CachedFont.cpp:
     21        * loader/cache/CachedSVGFont.cpp:
     22        * platform/graphics/Font.cpp:
     23        * platform/graphics/Font.h:
     24        * platform/graphics/FontCache.cpp:
     25        * platform/graphics/FontPlatformData.cpp:
     26        * platform/graphics/FontPlatformData.h:
     27        * platform/graphics/opentype/OpenTypeUtilities.cpp:
     28        (WebCore::renameAndActivateFont):
     29        * platform/graphics/win/DirectWriteUtilities.cpp: Added.
     30        * platform/graphics/win/DirectWriteUtilities.h: Added.
     31        * platform/graphics/win/FontCacheWin.cpp:
     32        (WebCore::createGDIFont):
     33        * platform/graphics/win/FontCascadeDirect2D.cpp:
     34        * platform/graphics/win/FontCustomPlatformData.cpp:
     35        (WebCore::FontCustomPlatformData::fontPlatformData):
     36        * platform/graphics/win/FontPlatformDataDirect2D.cpp:
     37        (WebCore::FontPlatformData::platformDataInit):
     38        (WebCore::FontPlatformData::FontPlatformData):
     39        (WebCore::FontPlatformData::createFallbackFont):
     40        * platform/graphics/win/FontPlatformDataWin.cpp:
     41        * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
     42        (WebCore::GlyphPage::fill):
     43        * platform/graphics/win/GraphicsContextDirect2D.cpp:
     44        * platform/graphics/win/SimpleFontDataDirect2D.cpp:
     45        (WebCore::Font::systemDWriteFactory): Deleted.
     46        (WebCore::Font::systemDWriteGdiInterop): Deleted.
     47        * platform/graphics/win/SimpleFontDataWin.cpp:
     48
    1492019-08-15  Jer Noble  <jer.noble@apple.com>
    250
  • trunk/Source/WebCore/PlatformFTW.cmake

    r248020 r248748  
    6565    platform/graphics/win/Direct2DOperations.cpp
    6666    platform/graphics/win/Direct2DUtilities.cpp
     67    platform/graphics/win/DirectWriteUtilities.cpp
    6768    platform/graphics/win/FloatPointDirect2D.cpp
    6869    platform/graphics/win/FloatRectDirect2D.cpp
     
    151152)
    152153
     154if (USE_CF)
     155    list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
     156        "${WEBCORE_DIR}/loader/archive/cf"
     157        "${WEBCORE_DIR}/platform/cf"
     158        "${WEBCORE_DIR}/platform/cf/win"
     159    )
     160
     161    list(APPEND WebCore_SOURCES
     162        editing/SmartReplaceCF.cpp
     163
     164        loader/archive/cf/LegacyWebArchive.cpp
     165
     166        platform/cf/KeyedDecoderCF.cpp
     167        platform/cf/KeyedEncoderCF.cpp
     168        platform/cf/SharedBufferCF.cpp
     169
     170        platform/cf/win/CertificateCFWin.cpp
     171
     172        platform/text/cf/HyphenationCF.cpp
     173    )
     174
     175    list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
     176        loader/archive/cf/LegacyWebArchive.h
     177
     178        platform/cf/win/CertificateCFWin.h
     179    )
     180
     181    list(APPEND WebCore_LIBRARIES ${COREFOUNDATION_LIBRARY})
     182    list(APPEND WebCoreTestSupport_LIBRARIES ${COREFOUNDATION_LIBRARY})
     183else ()
     184    list(APPEND WebCore_SOURCES
     185        platform/text/Hyphenation.cpp
     186    )
     187endif ()
     188
    153189list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
    154190    accessibility/win/AccessibilityObjectWrapperWin.h
     
    161197    platform/graphics/win/Direct2DOperations.h
    162198    platform/graphics/win/Direct2DUtilities.h
     199    platform/graphics/win/DirectWriteUtilities.h
    163200    platform/graphics/win/FullScreenController.h
    164201    platform/graphics/win/FullScreenControllerClient.h
     
    214251)
    215252
     253make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
     254file(COPY
     255    "${WEBCORE_DIR}/en.lproj/Localizable.strings"
     256    "${WEBCORE_DIR}/en.lproj/mediaControlsLocalizedStrings.js"
     257    DESTINATION
     258    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
     259)
    216260file(COPY
    217261    "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
  • trunk/Source/WebCore/css/CSSFontFaceSource.cpp

    r247377 r248748  
    4949#endif
    5050
    51 #if USE(DIRECT2D)
    52 #include <dwrite.h>
    53 #endif
    54 
    5551namespace WebCore {
    5652
  • trunk/Source/WebCore/loader/cache/CachedFont.cpp

    r246490 r248748  
    3939#include "WOFFFileFormat.h"
    4040#include <wtf/Vector.h>
    41 
    42 #if USE(DIRECT2D)
    43 #include <dwrite.h>
    44 #endif
    4541
    4642namespace WebCore {
  • trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp

    r248728 r248748  
    4040#include "TypedElementDescendantIterator.h"
    4141#include "SVGToOTFFontConversion.h"
    42 
    43 #if USE(DIRECT2D)
    44 #include <dwrite.h>
    45 #endif
    4642
    4743namespace WebCore {
  • trunk/Source/WebCore/platform/graphics/Font.cpp

    r246490 r248748  
    4444#if ENABLE(OPENTYPE_VERTICAL)
    4545#include "OpenTypeVerticalData.h"
    46 #endif
    47 
    48 #if USE(DIRECT2D)
    49 #include <dwrite.h>
    5046#endif
    5147
  • trunk/Source/WebCore/platform/graphics/Font.h

    r247566 r248748  
    5252
    5353#if USE(DIRECT2D)
    54 interface IDWriteFactory;
     54interface IDWriteFactory5;
    5555interface IDWriteGdiInterop;
    5656#endif
     
    220220#endif
    221221
    222 #if USE(DIRECT2D)
    223     WEBCORE_EXPORT static IDWriteFactory* systemDWriteFactory();
    224     WEBCORE_EXPORT static IDWriteGdiInterop* systemDWriteGdiInterop();
    225 #endif
    226 
    227222private:
    228223    Font(const FontPlatformData&, Origin, Interstitial, Visibility, OrientationFallback);
  • trunk/Source/WebCore/platform/graphics/FontCache.cpp

    r247498 r248748  
    4747#endif
    4848
    49 #if USE(DIRECT2D)
    50 #include <dwrite.h>
    51 #endif
    52 
    5349#if PLATFORM(IOS_FAMILY)
    5450#include <wtf/Lock.h>
  • trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp

    r227552 r248748  
    3030#include "SharedBuffer.h"
    3131#include <CoreGraphics/CGFont.h>
    32 #endif
    33 
    34 #if USE(DIRECT2D)
    35 #include <dwrite.h>
    3632#endif
    3733
  • trunk/Source/WebCore/platform/graphics/FontPlatformData.h

    r248152 r248748  
    6666
    6767#if USE(DIRECT2D)
    68 #include <dwrite.h>
     68#include <dwrite_3.h>
    6969#endif
    7070
     
    104104
    105105#if PLATFORM(WIN) && USE(DIRECT2D)
    106     FontPlatformData(GDIObject<HFONT>, IDWriteFont*, float size, bool syntheticBold, bool syntheticOblique, bool useGDI);
     106    FontPlatformData(GDIObject<HFONT>&&, IDWriteFont*, float size, bool syntheticBold, bool syntheticOblique, bool useGDI);
    107107#endif
    108108
     
    146146
    147147    static HRESULT createFallbackFont(const LOGFONT&, IDWriteFont**);
     148    static HRESULT createFallbackFont(HFONT, IDWriteFont**);
    148149#endif
    149150
  • trunk/Source/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp

    r173949 r248748  
    2929
    3030#include "SharedBuffer.h"
     31
     32#if USE(DIRECT2D)
     33#include "DirectWriteUtilities.h"
     34#include <dwrite_3.h>
     35#endif
    3136
    3237namespace WebCore {
     
    424429    }
    425430
     431#if USE(DIRECT2D)
     432    HRESULT hr = DirectWrite::addFontFromDataToProcessCollection(rewrittenFontData);
     433    ASSERT(SUCCEEDED(hr));
     434#endif
     435
    426436    return fontHandle;
    427437}
  • trunk/Source/WebCore/platform/graphics/win/BackingStoreBackendDirect2DImpl.h

    r248444 r248748  
    3535namespace WebCore {
    3636
     37class IntSize;
     38
    3739class BackingStoreBackendDirect2DImpl final : public BackingStoreBackendDirect2D {
    3840public:
  • trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp

    r247720 r248748  
    4848
    4949#if USE(DIRECT2D)
    50 #include <dwrite.h>
     50#include <dwrite_3.h>
    5151#endif
    5252
     
    507507    matchData.m_chosen.lfStrikeOut = false;
    508508    matchData.m_chosen.lfCharSet = DEFAULT_CHARSET;
    509 #if USE(CG) || USE(CAIRO)
     509#if USE(CG) || USE(CAIRO) || USE(DIRECT2D)
    510510    matchData.m_chosen.lfOutPrecision = OUT_TT_ONLY_PRECIS;
    511511#else
  • trunk/Source/WebCore/platform/graphics/win/FontCascadeDirect2D.cpp

    r248020 r248748  
    4141#include "WebCoreTextRenderer.h"
    4242#include <d2d1.h>
    43 #include <dwrite.h>
     43#include <dwrite_3.h>
    4444#include <wtf/MathExtras.h>
    4545
  • trunk/Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp

    r239156 r248748  
    3535
    3636#if USE(DIRECT2D)
    37 #include "Font.h"
    38 #include <dwrite.h>
     37#include "DirectWriteUtilities.h"
     38#include <dwrite_3.h>
    3939#endif
    4040
     
    6666    logFont.lfStrikeOut = false;
    6767    logFont.lfCharSet = DEFAULT_CHARSET;
    68 #if USE(CG) || USE(CAIRO)
     68#if USE(CG) || USE(CAIRO) || USE(DIRECT2D)
    6969    logFont.lfOutPrecision = OUT_TT_ONLY_PRECIS;
    7070#else
     
    7777
    7878    auto hfont = adoptGDIObject(::CreateFontIndirect(&logFont));
    79 
    8079#if USE(CG)
    8180    RetainPtr<CGFontRef> cgFont = adoptCF(CGFontCreateWithPlatformFont(&logFont));
    8281    return FontPlatformData(WTFMove(hfont), cgFont.get(), size, bold, italic, renderingMode == FontRenderingMode::Alternate);
    8382#else
    84     COMPtr<IDWriteFont> dwFont;
    85     HRESULT hr = Font::systemDWriteGdiInterop()->CreateFontFromLOGFONT(&logFont, &dwFont);
    86     if (!SUCCEEDED(hr)) {
    87         LOGFONT customFont;
    88         hr = ::GetObject(hfont.get(), sizeof(LOGFONT), &customFont);
    89         if (SUCCEEDED(hr))
    90             hr = FontPlatformData::createFallbackFont(customFont, &dwFont);
    91     }
    92     RELEASE_ASSERT(SUCCEEDED(hr));
     83    COMPtr<IDWriteFont> dwFont = DirectWrite::createWithPlatformFont(logFont);
    9384    return FontPlatformData(WTFMove(hfont), dwFont.get(), size, bold, italic, renderingMode == FontRenderingMode::Alternate);
    9485#endif
  • trunk/Source/WebCore/platform/graphics/win/FontPlatformDataDirect2D.cpp

    r237980 r248748  
    2929#if USE(DIRECT2D)
    3030
     31#include "DirectWriteUtilities.h"
    3132#include "GraphicsContext.h"
     33#include "HWndDC.h"
    3234#include "SharedGDIObject.h"
    3335#include <d2d1.h>
    34 #include <dwrite.h>
     36#include <dwrite_3.h>
    3537#include <wtf/Vector.h>
    3638
     
    4042{
    4143    LOGFONT logfont;
    42     GetObject(font, sizeof(logfont), &logfont);
    43 
    44     HRESULT hr = Font::systemDWriteGdiInterop()->CreateFontFromLOGFONT(&logfont, &m_dwFont);
    45     if (!SUCCEEDED(hr)) {
    46         hr = FontPlatformData::createFallbackFont(logfont, &m_dwFont);
    47         if (!SUCCEEDED(hr))
    48             return;
    49     }
     44    HRESULT hr = ::GetObject(font, sizeof(LOGFONT), &logfont);
     45    if (SUCCEEDED(hr))
     46        m_dwFont = DirectWrite::createWithPlatformFont(logfont);
     47    RELEASE_ASSERT(m_dwFont);
    5048
    5149    hr = m_dwFont->CreateFontFace(&m_dwFontFace);
    52     if (!SUCCEEDED(hr))
    53         return;
     50    RELEASE_ASSERT(SUCCEEDED(hr));
    5451
    5552    if (!m_useGDI)
     
    5754}
    5855
    59 FontPlatformData::FontPlatformData(GDIObject<HFONT> hfont, IDWriteFont* font, float size, bool bold, bool oblique, bool useGDI)
     56FontPlatformData::FontPlatformData(GDIObject<HFONT>&& hfont, IDWriteFont* font, float size, bool bold, bool oblique, bool useGDI)
    6057    : m_syntheticBold(bold)
    6158    , m_syntheticOblique(oblique)
     
    125122        return E_POINTER;
    126123
     124    *dwFont = DirectWrite::createWithPlatformFont(logFont).get();
     125
     126    return S_OK;
     127}
     128
     129HRESULT FontPlatformData::createFallbackFont(HFONT hfont, IDWriteFont** dwFont)
     130{
     131    if (!dwFont)
     132        return E_POINTER;
     133
    127134    COMPtr<IDWriteFontCollection> fontCollection;
    128     HRESULT hr = Font::systemDWriteFactory()->GetSystemFontCollection(&fontCollection);
     135    HRESULT hr = DirectWrite::factory()->GetSystemFontCollection(&fontCollection);
    129136    if (FAILED(hr))
    130137        return hr;
    131138
    132     wchar_t localeName[LOCALE_NAME_MAX_LENGTH];
    133     int localeLength = GetUserDefaultLocaleName(localeName, LOCALE_NAME_MAX_LENGTH);
     139    HWndDC hdc(0);
     140    HGDIOBJ oldFont = ::SelectObject(hdc, hfont);
    134141
    135     COMPtr<IDWriteFontFamily> fontFamily;
    136 
    137     unsigned fontFamilyCount = fontCollection->GetFontFamilyCount();
    138     for (unsigned fontIndex = 0; fontIndex < fontFamilyCount; ++fontIndex) {
    139         hr = fontCollection->GetFontFamily(fontIndex, &fontFamily);
    140         if (FAILED(hr))
    141             return hr;
    142 
    143         COMPtr<IDWriteLocalizedStrings> familyNames;
    144         hr = fontFamily->GetFamilyNames(&familyNames);
    145         if (FAILED(hr))
    146             return hr;
    147 
    148         BOOL exists = false;
    149         unsigned localeIndex = 0;
    150         if (localeLength)
    151             hr = familyNames->FindLocaleName(localeName, &localeIndex, &exists);
    152 
    153         if (SUCCEEDED(hr) && !exists)
    154             hr = familyNames->FindLocaleName(L"en-us", &localeIndex, &exists);
    155 
    156         if (FAILED(hr))
    157             return hr;
    158 
    159         unsigned familyNameLength = 0;
    160         hr = familyNames->GetStringLength(localeIndex, &familyNameLength);
    161         if (!SUCCEEDED(hr))
    162             return hr;
    163 
    164         Vector<wchar_t> familyName(familyNameLength + 1);
    165         hr = familyNames->GetString(localeIndex, familyName.data(), familyName.size());
    166         if (!SUCCEEDED(hr))
    167             return hr;
    168 
    169         if (!wcscmp(logFont.lfFaceName, familyName.data()))
    170             break;
    171 
    172         fontFamily = nullptr;
     142    COMPtr<IDWriteFontFace> fontFace;
     143    hr = DirectWrite::gdiInterop()->CreateFontFaceFromHdc(hdc, &fontFace);
     144    if (FAILED(hr)) {
     145        ::SelectObject(hdc, oldFont);
     146        return hr;
    173147    }
    174148
    175     if (!fontFamily) {
    176         hr = fontCollection->GetFontFamily(0, &fontFamily);
    177         if (FAILED(hr))
    178             return hr;
     149    LOGFONT gdiBasedFont = { };
     150    hr = DirectWrite::gdiInterop()->ConvertFontFaceToLOGFONT(fontFace.get(), &gdiBasedFont);
     151    if (FAILED(hr)) {
     152        ::SelectObject(hdc, oldFont);
     153        return hr;
    179154    }
    180155
    181     DWRITE_FONT_WEIGHT weight = static_cast<DWRITE_FONT_WEIGHT>(logFont.lfWeight);
    182     DWRITE_FONT_STRETCH stretch = static_cast<DWRITE_FONT_STRETCH>(logFont.lfQuality);
    183     DWRITE_FONT_STYLE style = logFont.lfItalic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL;
     156    hr = fontCollection->GetFontFromFontFace(fontFace.get(), dwFont);
    184157
    185     hr = fontFamily->GetFirstMatchingFont(weight, stretch, style, dwFont);
     158    if (!SUCCEEDED(hr))
     159        hr = DirectWrite::webProcessFontCollection()->GetFontFromFontFace(fontFace.get(), dwFont);
    186160
    187     return hr;
     161    ::SelectObject(hdc, oldFont);
     162    if (SUCCEEDED(hr))
     163        return hr;
     164
     165    return createFallbackFont(gdiBasedFont, dwFont);
    188166}
    189167
  • trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp

    r248285 r248748  
    3535
    3636#if USE(DIRECT2D)
    37 #include <dwrite.h>
     37#include <dwrite_3.h>
    3838#endif
    3939
  • trunk/Source/WebCore/platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp

    r247014 r248748  
    2929#if USE(DIRECT2D)
    3030
     31#include "DirectWriteUtilities.h"
    3132#include "Font.h"
    3233#include "TextAnalyzerHelper.h"
    33 #include <dwrite.h>
     34#include <dwrite_3.h>
    3435
    3536namespace WebCore {
     
    4445
    4546    COMPtr<IDWriteTextAnalyzer> analyzer;
    46     HRESULT hr = Font::systemDWriteFactory()->CreateTextAnalyzer(&analyzer);
     47    HRESULT hr = DirectWrite::factory()->CreateTextAnalyzer(&analyzer);
    4748    RELEASE_ASSERT(SUCCEEDED(hr));
    4849
  • trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp

    r248444 r248748  
    3939#include <d2d1.h>
    4040#include <d2d1effects.h>
    41 #include <dwrite.h>
     41#include <dwrite_3.h>
    4242#include <wtf/URL.h>
    4343
  • trunk/Source/WebCore/platform/graphics/win/SimpleFontDataDirect2D.cpp

    r247014 r248748  
    2929#if USE(DIRECT2D)
    3030
     31#include "DirectWriteUtilities.h"
    3132#include "FloatRect.h"
    3233#include "FontCache.h"
     
    3738#include "NotImplemented.h"
    3839#include <comutil.h>
    39 #include <dwrite.h>
     40#include <dwrite_3.h>
    4041#include <mlang.h>
    4142#include <unicode/uchar.h>
     
    4748
    4849namespace WebCore {
    49 
    50 IDWriteFactory* Font::systemDWriteFactory()
    51 {
    52     static IDWriteFactory* directWriteFactory = nullptr;
    53     if (!directWriteFactory) {
    54         HRESULT hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(directWriteFactory), reinterpret_cast<IUnknown**>(&directWriteFactory));
    55         RELEASE_ASSERT(SUCCEEDED(hr));
    56     }
    57 
    58     return directWriteFactory;
    59 }
    60 
    61 IDWriteGdiInterop* Font::systemDWriteGdiInterop()
    62 {
    63     static IDWriteGdiInterop* directWriteGdiInterop = nullptr;
    64     if (!directWriteGdiInterop) {
    65         HRESULT hr = systemDWriteFactory()->GetGdiInterop(&directWriteGdiInterop);
    66         RELEASE_ASSERT(SUCCEEDED(hr));
    67     }
    68 
    69     return directWriteGdiInterop;
    70 }
    7150
    7251static Vector<WCHAR> getFaceName(IDWriteFont* font)
  • trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp

    r246831 r248748  
    3838#include <wtf/win/GDIObject.h>
    3939
    40 #if USE(DIRECT2D)
    41 #include <dwrite.h>
    42 #endif
    43 
    4440namespace WebCore {
    4541
Note: See TracChangeset for help on using the changeset viewer.