- From: jfkthame via GitHub <sysbot+gh@w3.org>
- Date: Fri, 05 Mar 2021 15:07:28 +0000
- To: public-css-archive@w3.org
> My understanding is the intention is not to use a fully down- or upscaled font internally as that would affect the line height. As @jfkthame explains, ascent / descent would still be computed from `font-size:`, Not quite. To clarify, my position is that `ascent-override` etc would continue to be computed based on the `font-size`, without regard to any `glyph-scale-factor` in effect; so if these descriptors are used to control line height, the glyph scaling will have no effect. But if ascent etc are *not* overridden by descriptors, the font's `normal` metrics *will* be affected by the scale factor. > which I think makes sense (otherwise what's the difference to using a different `font-size:` to start with? This is not like using a different `font-size` because it is associated with an individual font face, not with an element property. So within a single element, styled with a single `font-size`, there might be multiple font faces in use (each covering a different script, for example), each of which could have its own different `glyph-scale-factor`, designed to visually harmonize the different designs. It's also not like using a different `font-size` because it does not affect the size of the `em` unit, etc. > So perhaps it can be described from an implementation perspective as splitting the internal font object used for retrieving metrics for line height (ascent, descent) in layout from the one that we use to actually perform inline layout with, that we shape with, and that we shape with. Or perhaps more simply put: Keep line height, ascent, descent, baseline computations based on font-size: and original metrics at `font-size:` (taking `ascent-override` etc. into account), As described above, I think that if the font is being queried for its `normal` ascent, descent, baseline, etc., these metrics should come from the *scaled* font so that they maintain their expected relationship with the glyph shapes. It's in the case when `override` descriptors are used to set them to specific values (expressed as percentages of `font-size`) that the scaling has no effect; an ascent of 80%, for instance, should remain at 80% of 1em regardless of the scaling of the glyphs relative to the em-square. > but then inside the line, using a scaled font which will operate at the decreased/increased font-size for how it behaves in shaping (scaled advances, shorter/longer text run results) and how it draws (smaller, larger glyphs). -- GitHub Notification of comment by jfkthame Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6075#issuecomment-791477741 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 5 March 2021 15:07:31 UTC