[csswg-drafts] [css-text] Circular dependency between letter-spacing and x-height (#5498)

litherum has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text] Circular dependency between letter-spacing and x-height ==
https://drafts.csswg.org/css-text-3/#letter-spacing-property

> When the effective spacing between two characters is not zero (due to either justification or a non-zero value of letter-spacing), user agents should not apply optional ligatures

`letter-spacing` takes a `<length>`, which means that it accepts [font-relative units](https://drafts.csswg.org/css-values-4/#font-relative-lengths), like `2ex` for example. Some (all?) browsers can measure the `ex` length by actually rendering a literal "x" character and inspecting its height (at least in the case where the metrics inside the font appear to be bogus). However, the `liga` font feature can change which glyph the "x" character renders with, so if we're supposed to not apply optional ligatures, the height of the "x" character can change depending on whether we're disabling ligatures or not. This means that, if someone applies `letter-spacing` on an element with `ex` units, we may have to measure a glyph, but in order to know which glyph to measure, we have to know whether that glyph has a height of 0.

It's a weird fiddly corner case that probably would never occur in real content, but it's probably worth at least considering how to fix it.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5498 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 4 September 2020 04:41:30 UTC