Bug 242466 - [css-values] Implement CSS cap unit
Summary: [css-values] Implement CSS cap unit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
: 245033 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-07 11:36 PDT by Tim Nguyen (:ntim)
Modified: 2023-08-25 20:12 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2022-07-07 11:36:07 PDT
https://drafts.csswg.org/css-values/#cap

> Equal to the used cap-height of the first available font [CSS3-FONTS]. The cap-height is so called because it is approximately equal to the height of a capital Latin letter. However, a cap is defined even for fonts that do not contain Latin letters. The cap-height of a font can be found in different ways. Some fonts contain reliable metrics for the cap-height. If reliable font metrics are not available, UAs may determine the cap-height from the height of an uppercase glyph. One possible heuristic is to look at how far the glyph for the uppercase “O” extends below the baseline, and subtract that value from the top of its bounding box. In the cases where it is impossible or impractical to determine the cap-height, the font’s ascent must be used.
Comment 1 Radar WebKit Bug Importer 2022-07-14 11:37:16 PDT
<rdar://problem/97025854>
Comment 2 Sebastian Zartner 2023-05-03 14:10:47 PDT
Looks like bug 245033 is a duplicate of this one. Though, given, that that bug has a bit more activity and also covers the rcap unit, maybe this bug should be marked as a duplicate.

Sebastian
Comment 3 Tim Nguyen (:ntim) 2023-08-24 00:43:24 PDT
*** Bug 245033 has been marked as a duplicate of this bug. ***
Comment 4 Tim Nguyen (:ntim) 2023-08-24 21:57:10 PDT
I might implement rcap as part of bug 260648 depending on landing order.
Comment 5 Tim Nguyen (:ntim) 2023-08-25 14:28:49 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17082
Comment 6 EWS 2023-08-25 20:12:22 PDT
Committed 267315@main (ce1ebf3906ee): <https://commits.webkit.org/267315@main>

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