@@ -8262,38 +8262,44 @@ Ink Overflow from Text</h2>
8262
8262
<p><em> This appendix is non-normative.</em></p>
8263
8263
8264
8264
<div class="example">
8265
- <p> The example below demonstrates a [=hanging glyph=] .</p>
8265
+ <p> The example below demonstrates [=ink overflow=] from text .</p>
8266
8266
<div class="figure" style="margin:0; font-size:10rem; font-family:garamond; font-style:italic">
8267
8267
<span style="display:inline-block; width:1ch; height:1lh; background:green; opacity:0.5"></span><span style="vertical-align: top;"> f</span><span style="display:inline-block; width:1ch; height:1lh; background:green; opacity:0.5"></span>
8268
8268
</div>
8269
8269
</div>
8270
8270
8271
- Because [=hanging glyphs=] are considered [=ink overflow=] ,
8272
- and hence are not included in [=inline box=] geometry,
8273
- there is no straightforward way to measure their extent,
8271
+ Some glyphs have a painted area that extends beyond the
8272
+ bounding box described by their origin and advance.
8273
+ In these cases, the extra painted area generates [=ink overflow=] ,
8274
+ and hence is not included in [=inline box=] geometry.
8275
+ There is no straightforward way to measure the extent
8276
+ of [=ink overflow=] generated by these glyphs,
8274
8277
or to pre-compute padding or margin lengths that will
8275
- prevent [=hanging glyphs=] from overlapping adjacent content.
8276
- The extent of [=ink overflow=] from [=hanging glyphs=]
8277
- is determined by the font rendering system,
8278
- and beyond the scope of this specification.
8278
+ prevent them from overlapping adjacent content.
8279
+ The actual extent of [=ink overflow=] is determined by the font rendering system,
8280
+ and is beyond the scope of this specification.
8279
8281
8280
8282
However, any two conforming browser implementations,
8281
8283
when rendering a given piece of text content
8282
8284
using a given font in a supported format
8283
8285
(see [[css-fonts-4#font-format-definitions]] ),
8284
8286
will produce identically-sized [=ink overflow rectangles=] ,
8285
- within a 2-pixel margin of error.
8286
-
8287
- A practical way to prevent [=hanging glyphs=] from
8287
+ within a 2-pixel margin of error. For a known font,
8288
+ a practical way to prevent glyph [=ink overflow=] from
8288
8289
overlapping adjacent content is to load the target
8289
8290
content in any conforming web browser, gauge the extent
8290
- of [=ink overflow=] from [=hanging glyphs=] via visual inspection,
8291
+ of [=ink overflow=] via visual inspection,
8291
8292
and adjust padding/margin lengths to avoid overlap, plus
8292
8293
an extra two pixels to allow for variations between implementations.
8293
- This should be sufficient to prevent unwanted overlap in all
8294
- conforming implementations without the necessity of testing
8295
- each implementation individually.
8296
8294
8295
+ Note that there are many factors that may cause the glyph rendering subsystem
8296
+ to use a font other than the one specified in stylesheets when drawing text,
8297
+ including but not limited to UA settings, accessibility features,
8298
+ and the availability of web fonts.
8299
+ The extent of [=ink overflow=] derives from the actual font used for rendering text,
8300
+ and developers should allow for the possibility that
8301
+ the actual rendered extent of [=ink overflow=] from text
8302
+ does not match what they measured during development.
8297
8303
8298
8304
<h2 id="priv" class="no-num">
8299
8305
Privacy Considerations</h2>
0 commit comments