Re: [csswg-drafts] [css-fonts] Reduce layout shift via @font-face descriptor(s) overriding inline spacing (#5533)

> @xiaochengh can you clarify the relationship between this proposal and #126,

No *direct* relation, at least for the issue that r12a raises in the original post of the thread, but it sits in a related space. This is for the more common case when both the primary and fallback font are visually similar and don't need any major adjustment, but just need slight tweaks to make their advances line up better.

> can you confirm that the advance-override you're proposing applies to the actual font specified in src: of the @font-face when loaded?

It applies to whatever font the @font-face ends up representing. I didn't really understand your question, but hopefully that answers it sufficiently?

> I assume, to use this for reducing layout-shift and specifying an advance-override for fallback fonts, how would you establish the connection in the font-stack, would you work with src: local(...) to refer to local fallback font names, or through other means?

This works entirely thru @font-face, so yes, if you want to adjust a local font for use as a fallback, you'd use `src: local()`.

> I assume the intention is not to have the primary font's advances permanently overridden as the end result after all fonts have loaded, but instead only show the condensed/stretched layout temporarily?

No, this is permanent; if it was temporary, it would cause the very layout shift we're trying to avoid.  Your primary font presumably won't have a multiplier, and will display normally; you generally will only apply this to your fallback to make it match the primary more closely, so that when the fallback is swapped out there's as little layout shift as possible.

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


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

Received on Friday, 5 February 2021 18:07:17 UTC