Skip to content

[WinCairo] Use Cairo DirectWrite font backend #18985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

fujii
Copy link
Contributor

@fujii fujii commented Oct 12, 2023

0f06694

[WinCairo] Use Cairo DirectWrite font backend
https://bugs.webkit.org/show_bug.cgi?id=215259

Reviewed by Don Olmstead.

cairo 1.18.0 added the dwrite font backend. Use it instead of the
legacy cairo win32 font backend.

Windows port supports color font now. However, Windows port is still
using the lagacy Uniscribe API for shaping. It should be replaced by
DirectWrite in the future.

* Source/WebCore/PlatformWin.cmake:
* Source/WebCore/platform/graphics/FontPlatformData.h:
* Source/WebCore/platform/graphics/cairo/FontCairo.cpp:
(WebCore::FontCascade::drawGlyphs):
* Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* Source/WebCore/platform/graphics/win/FontCustomPlatformDataWin.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::getDWriteGdiInterop):
(WebCore::createCairoDWriteFontFace):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::familyName const):
* Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp:
(WebCore::Font::platformInit):
* LayoutTests/platform/wincairo/TestExpectations:
* Source/cmake/OptionsWin.cmake:

Canonical link: https://commits.webkit.org/269270@main

fcdb44e

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch ✅ 🛠 jsc-mips
✅ 🛠 🧪 unsafe-merge ✅ 🛠 watch-sim ❌ 🧪 jsc-mips-tests

@fujii fujii self-assigned this Oct 12, 2023
@fujii fujii force-pushed the eng/cairo-dwrite-font branch from 01616c6 to fcdb44e Compare October 12, 2023 06:02
@fujii fujii added the Platform Portability improvements and other general platform improvements not driven directly by site bugs. label Oct 12, 2023
@fujii fujii requested a review from donny-dont October 12, 2023 06:02
@fujii fujii added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 12, 2023
https://bugs.webkit.org/show_bug.cgi?id=215259

Reviewed by Don Olmstead.

cairo 1.18.0 added the dwrite font backend. Use it instead of the
legacy cairo win32 font backend.

Windows port supports color font now. However, Windows port is still
using the lagacy Uniscribe API for shaping. It should be replaced by
DirectWrite in the future.

* Source/WebCore/PlatformWin.cmake:
* Source/WebCore/platform/graphics/FontPlatformData.h:
* Source/WebCore/platform/graphics/cairo/FontCairo.cpp:
(WebCore::FontCascade::drawGlyphs):
* Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* Source/WebCore/platform/graphics/win/FontCustomPlatformDataWin.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::getDWriteGdiInterop):
(WebCore::createCairoDWriteFontFace):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::familyName const):
* Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp:
(WebCore::Font::platformInit):
* LayoutTests/platform/wincairo/TestExpectations:
* Source/cmake/OptionsWin.cmake:

Canonical link: https://commits.webkit.org/269270@main
@webkit-commit-queue
Copy link
Collaborator

Committed 269270@main (0f06694): https://commits.webkit.org/269270@main

Reviewed commits have been landed. Closing PR #18985 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 0f06694 into WebKit:main Oct 12, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 12, 2023
@fujii fujii deleted the eng/cairo-dwrite-font branch October 18, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Portability improvements and other general platform improvements not driven directly by site bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants