| Summary: | [WinCairo] Get cap-height font metrics for initial-letter support | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||
| Component: | Platform | Assignee: | Fujii Hironori <Hironori.Fujii> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | don.olmstead, ews-watchlist, mmaxfield, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Fujii Hironori
2022-12-22 18:24:47 PST
DirectWrite has a API to get capHeight. https://learn.microsoft.com/en-us/windows/win32/api/dwrite/ns-dwrite-dwrite_font_metrics But, no such win32 API. I think (tmAscent - tmInternalLeading) is the capHeight. https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-textmetrica https://learn.microsoft.com/en-us/windows/win32/gdi/string-widths-and-heights Created attachment 464168 [details]
Patch
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 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. Created attachment 464191 [details]
[fast-cq] Patch
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]. |