diff --git a/css-text-3/Overview.bs b/css-text-3/Overview.bs index ab5197bcfbb..5ae642e251c 100644 --- a/css-text-3/Overview.bs +++ b/css-text-3/Overview.bs @@ -28,6 +28,7 @@ WPT Path Prefix: /css/css-text/
spec:css2; type:dfn; text:document language spec:css-ruby-1; type:dfn; text:ruby +spec:css-overflow-3; type:dfn; text:ink overflow@@ -6948,7 +6949,7 @@ Hanging Glyphs when measuring the line’s contents for fit, alignment, or justification. Depending on the line’s alignment/justification, this can result in the mark being placed outside the line box. - The [=hanging=] glyph is also not taken into account + The hanging glyph is also not taken into account when computing [=intrinsic sizes=] ([=min-content size=] and [=max-content size=]), and any sizes derived thereof. (The interaction of this measurement and kerning is currently UA-defined; @@ -6961,14 +6962,13 @@ Hanging Glyphs overflow-wrap/overflow-wrap-min-content-size-009.html - A hanging glyph - is still enclosed inside its parent inline box + A [=hanging glyph=] is still enclosed inside its parent inline box and still participates in text justification: its character advance is just not measured when determining how much content fits on the line, how much the line’s contents need to be expanded or compressed for justification, or how to position the content within the line box for text alignment. - Effectively, the [=hanging=] glyph character advance + Effectively, the [=hanging glyph=] character advance is re-interpreted as an additional negative margin on the affected edge of its parent [=inline box=]; the line is otherwise laid out as usual. @@ -6979,6 +6979,8 @@ Hanging Glyphs when the content is editable or in other circumstances where treating it as [=scrollable overflow=] would be useful to the user. + [[#text-ink-overflow]] contains additional information about + [=ink overflow=] from text rendering. [[!CSS-OVERFLOW-3]]
Name: hanging-punctuation @@ -8253,6 +8255,52 @@ Small Kana Mappings text-transform/text-transform-full-size-kana-008.html ++Appendix H: +Ink Overflow from Text
+ +This appendix is non-normative.
+ +++ + Some glyphs have a painted area that extends beyond the + bounding box described by their origin and advance. + In these cases, the extra painted area generates [=ink overflow=], + and hence is not included in [=inline box=] geometry. + There is no straightforward way to measure the extent + of [=ink overflow=] generated by these glyphs, + or to pre-compute padding or margin lengths that will + prevent them from overlapping adjacent content. + The actual extent of [=ink overflow=] is determined by the font rendering system, + and is beyond the scope of this specification. + + However, any two conforming browser implementations, + when rendering a given piece of text content + using a given font in a supported format + (see [[css-fonts-4#font-format-definitions]]), + will produce identically-sized [=ink overflow rectangles=], + within a 2-pixel margin of error. For a known font, + a practical way to prevent glyph [=ink overflow=] from + overlapping adjacent content is to load the target + content in any conforming web browser, gauge the extent + of [=ink overflow=] via visual inspection, + and adjust padding/margin lengths to avoid overlap, plus + an extra two pixels to allow for variations between implementations. + + Note that there are many factors that may cause the glyph rendering subsystem + to use a font other than the one specified in stylesheets when drawing text, + including but not limited to UA settings, accessibility features, + and the availability of web fonts. + The extent of [=ink overflow=] derives from the actual font used for rendering text, + and developers should allow for the possibility that + the actual rendered extent of [=ink overflow=] from text + does not match what they measured during development. +The example below demonstrates [=ink overflow=] from text.
++ f ++Privacy Considerations