Re: [csswg-drafts] [css-fonts-5] Add glyph scaling override descriptor to @font-face (#6075)

@drott This scaling needs to affect the baseline table, otherwise the glyphs won't actually line up. (The purpose of baseline tables is to get proper optical alignment across fonts. It can't do its job if you scale the table but not the glyphs or vice versa.)

@jfkthame The ascent/descent metrics are generally based on the size of the gyphs, right? They're there to show how much space to reserve for the glyphs. The main use case for adding overrides for them was because OpenType has multiple sets of ascent/descent metrics and platforms can't agree on which set of metrics to use, not because we needed arbitrary overrides; I expect most cases the override value will match one or the other built-in ascent value.  As for effect on layout, the height of the line is based on `line-height`, which most people set explicitly anyway; if there's concerns about scaling affecting the line height, don't use `line-height: normal`. But I want this feature to work not just for cases where the font is not just a temporary fallback that will get erased in 5 seconds but also for cases where multiple fonts need to work together but their optical sizes don't match well without adjustment. Cases where this scaling factor is for a permanent, desired font. For those cases if the ascent-override is set to a value that corresponds to some typographic design reference for the glyphs, then that needs to scale with the glyphs.

@xiaochengh `font-size-adjust` is specifically defined to affect the "used font-size" (i.e. the one used to size and select the font) and not the "computed font-size" (i.e. the one used for inheritance and calculating `em` units etc.) for the same reasons as we're discussing here for the glyph size override. And we're careful about where we use "computed font size" rather than "used font size" for that reason (or should be, and should fix anywhere they're mixed up regardless). So I think these need to be kept in sync on how they behave, unless there's some particular reason why `font-size-adjust` and this feature need to be distinct in some particular detail in which case we can make that detail a well-considered exception.

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


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

Received on Tuesday, 9 March 2021 21:24:34 UTC