Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 42b3d8d1209223fc00f05d7f280f14f039b2081f
https://github.com/WebKit/WebKit/commit/42b3d8d1209223fc00f05d7f280f14f039b2081f
Author: Brent Fulgham <[email protected]>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/rendering/RenderText.cpp
M Tools/TestWebKitAPI/Tests/WebCore/FontCascade.cpp
Log Message:
-----------
Synthetic bold does not require the slow text measuring path
https://bugs.webkit.org/show_bug.cgi?id=324355
rdar://187588326
Reviewed by Vitor Roriz.
Following the work in Bug 201725 and Bug 324291 (321206@main), we can remove
some of the
overly-conservative guards that forced synthetic bold to use more expensive
text measuring
code paths.
Previously, the synthetic bold offset was incorporated into the advances, and
had to be
accounted for in text measurement. Now that we have corrected that design, we
no longer
need this additional work.
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::canUseSimplifiedTextMeasuring):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::widthForSimpleTextSlow const): Remove unneeded assertion.
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::initiateFontLoadingByAccessingGlyphDataAndComputeCanUseSimplifiedTextMeasuring):
* Tools/TestWebKitAPI/Tests/WebCore/FontCascade.cpp:
(TestWebKitAPI::TEST(FontCascadeTest,
SyntheticBoldMeasuresTheSameOnBothSimpleTextPaths)):
Confirm that both measurement paths agree for synthetically bolded fonts.
Canonical link: https://commits.webkit.org/321394@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications