Re: [csswg-drafts] [css-fonts-5] advance-override details (#5983)

> - How are we increasing/decreasing the advance width? Are we increasing the font size? Stretching in the X axis? Adding space around each glyph? Something else?

In Chrome's implementation, there's no font size changes or stretches. It shares quite a lot of code with `letter-spacing`, so it ends up adding space after each glyph.

IMO this seems better than adding spacing around each glyph. Otherwise, the first character may look misaligned with the start of the line.

Anyway, all these choices have no difference for the purpose of reducing layout shift...

> - If you're adding space around glyphs, is it applied at the start/end of the line also?

This is one of the topics that apply to `letter-spacing` but not to `advance-override`, since we are modifying the advances of the glyphs instead of adding spacing in between. I don't see a reason why we should leave the start/end of line unmodified.

> - On Arabic and Mongolian as well? etc.

Maybe we should recommend NO for complex scripts and fonts. Reasons:
- The legibility really depends on whether the text shaper supports changing glyph widths, which is case by case different.
- In [some](https://jsfiddle.net/wpnjav2k/1/) [cases](https://jsfiddle.net/mgx5t72s/), different fonts can shape the same text with different numbers of glyphs. Then `advance-override` won't work as good as, e.g., Latin.
  - Note: I can't read these languages, so I don't know if this is a common case, or due to the generated gibberish text


-- 
GitHub Notification of comment by xiaochengh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5983#issuecomment-777934132 using your GitHub account


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

Received on Friday, 12 February 2021 02:49:08 UTC