WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
249830
[WinCairo] Get cap-height font metrics for initial-letter support
https://bugs.webkit.org/show_bug.cgi?id=249830
Summary
[WinCairo] Get cap-height font metrics for initial-letter support
Fujii Hironori
Reported
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
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
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2022-12-22 18:28:46 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
Fujii Hironori
Comment 2
2022-12-22 18:36:41 PST
Created
attachment 464168
[details]
Patch
Don Olmstead
Comment 3
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?
Fujii Hironori
Comment 4
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.
Fujii Hironori
Comment 5
2022-12-24 04:44:15 PST
Created
attachment 464191
[details]
[fast-cq] Patch
EWS
Comment 6
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]
.
Radar WebKit Bug Importer
Comment 7
2022-12-24 04:49:16 PST
<
rdar://problem/103684193
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug