Re: [csswg-drafts] [css-fonts] Specifying changes to parameters for fallback fonts (#126)

@litherum With regard to:

>   * [`font-size`](https://github.com/w3c/csswg-drafts/issues/5976) (low priority, since we already have [`font-size-adjust`](https://drafts.csswg.org/css-fonts-4/#font-size-adjust-prop))

I'm not sure `font-size-adjust` really covers this, especially for non-Latin fonts where the concept of ex-height may not be at all well defined, and there's a good chance that whatever data may be in fonts won't be appropriate to harmonize across families.

So to take @r12a's example of Mongolian, I imagine an author might want to write something like (using a hypothetical `font-size-override` descriptor):

    @font-face {
        font-family: AdjustedBaiti;
        src: local("MongolianBaiti");
        font-size-override: 125%;
    }
    @font-face {
        font-family: AdjustedNotoMongolian;
        src: local("NotoSansMongolian");
        font-size-override: 75%;
    }

    body { font-family: AdjustedBaiti, AdjustedMongolian, serif; }

and this would use Baiti if available, enlarged to 125% of the computed `font-size`; or else Noto, reduced to 75%; or if neither of these are present, you'd end up with whatever `serif` maps to or whatever fallback finds.

`font-size-adjust` doesn't feel like the right tool for this, given its very specific (and Latin-oriented) definition. I suppose in theory if it were a descriptor, it would be possible to determine a `font-size-adjust` value for each `@font-face` rule that would yield the desired size relationship, but it feels really awkward.

(Maybe a solution would be an `ex-height` descriptor, so that you could specify an arbitrary value for a given face, to get control of what `font-size-adjust` will do for it even if it's a non-Latin script with no inherent "ex-height" and where the value in the font resource itself may be meaningless. Still feels like a cumbersome way to go about things, though.)

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


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

Received on Wednesday, 10 February 2021 19:00:57 UTC