Bug 249830 - [WinCairo] Get cap-height font metrics for initial-letter support
Summary: [WinCairo] Get cap-height font metrics for initial-letter support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-22 18:24 PST by Fujii Hironori
Modified: 2022-12-24 04:49 PST (History)
4 users (show)

See Also:


Attachments
Patch (23.58 KB, patch)
2022-12-22 18:36 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
[fast-cq] Patch (23.73 KB, patch)
2022-12-24 04:44 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2022-12-22 18:24:47 PST
[WinCairo] Get cap-height font metrics for initial-letter supportw

-webkit-initial-letter doesn't work for WinCairo.

See also:
  Bug 136841 – Implement cap height in SimpleFontDataWin to enable initial-letter support for Windows
  Bug 137108 – [freetype] Fix support for the initial-letter CSS property to first-letter
Comment 2 Fujii Hironori 2022-12-22 18:36:41 PST
Created attachment 464168 [details]
Patch
Comment 3 Don Olmstead 2022-12-23 15:04:12 PST
Comment on attachment 464168 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=464168&action=review

Fix then land

> Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp:81
> +    m_fontMetrics.setCapHeight(ascent);

Shouldn’t this be capHeight?
Comment 4 Fujii Hironori 2022-12-23 16:12:56 PST
Comment on attachment 464168 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=464168&action=review

>> Source/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp:81
>> +    m_fontMetrics.setCapHeight(ascent);
> 
> Shouldn’t this be capHeight?

Good catch. Will fix. Thank you for the review.
Comment 5 Fujii Hironori 2022-12-24 04:44:15 PST
Created attachment 464191 [details]
[fast-cq] Patch
Comment 6 EWS 2022-12-24 04:48:38 PST
Committed 258319@main (998885749458): <https://commits.webkit.org/258319@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 464191 [details].
Comment 7 Radar WebKit Bug Importer 2022-12-24 04:49:16 PST
<rdar://problem/103684193>