haikuwebkit/LayoutTests/platform/win/mathml
Myles C. Maxfield 0ced96d06a [Apple Win] Migrate from FontPlatformDataWin.cpp to FontPlatformDataCoreText.cpp
https://bugs.webkit.org/show_bug.cgi?id=216448

Reviewed by Darin Adler.

Source/WebCore:

This is one of the steps toward migrating the Apple Win port off of CGFont and on to
CTFont. This patch removes the #if !PLATFORM(WIN) guard in FontPlatformDataCoreText.cpp
and deletes the old functions it used to be using. It fixes up the Core Text functions to
use ctFont() instead of font(), because font() returns the HFONT on Windows.

It also adds a new helper, platformOpenTypeTable(), because it looks like
CTFontCopyTable() sometimes fails, so we can use this function to fall back to using the
HFONT and the win32 API instead.

Covered by existing tests.

* platform/graphics/FontPlatformData.cpp:
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::ctFont const):
(WebCore::FontPlatformData::font const):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::platformOpenTypeTable const):
* platform/graphics/coretext/FontPlatformDataCoreText.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::registeredFont const):
(WebCore::FontPlatformData::ctFont const):
(WebCore::FontPlatformData::openTypeTable const):
(WebCore::FontPlatformData::description const):
(WebCore::FontPlatformData::familyName const):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/win/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::openTypeTable const):
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::platformOpenTypeTable const):
(WebCore::FontPlatformData::openTypeTable const): Deleted.
(WebCore::FontPlatformData::description const): Deleted.

Source/WebCore/PAL:

* pal/spi/win/CoreTextSPIWin.h:

LayoutTests:

These two tests are progressions.

* platform/win/mathml/opentype/opentype-stretchy-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt:

Canonical link: https://commits.webkit.org/229355@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-15 04:19:22 +00:00
..
opentype [Apple Win] Migrate from FontPlatformDataWin.cpp to FontPlatformDataCoreText.cpp 2020-09-15 04:19:22 +00:00
presentation [Apple Win] Migrate from CGFontGetGlyphsForUnichars() to CTFontGetGlyphsForCharacters() 2020-09-14 08:17:03 +00:00
radical-fallback-expected.png
radical-fallback-expected.txt