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

On Wed, 2021-02-10 at 11:01 -0800, jfkthame wrote:


[...]
>    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.

More precisely, that would be done on a per-character basis, so if
there's a character in the 2nd but not the 1st font, and the rest are
available in the 1st, you get a mix. I'm not sure that anything could
be done better, except that you may very well want (or need) different
fallback fonts depeing on the font chosen.

There's also no way with font-face to say, if Helvetica was chosen for
the regular font in this element, use Helvetica-oblique as the italic
font, and if Helevetica-Oblique is not available, use serif as the font
for p, not Helvetica at all.

So i think i'd prefer to see a @font-family() or @font-set() that can
have a use-when: all-available property. That way multilingual
documents have a much better chance of working. I don't think that
affects Richard's original use case, though.

Part of what's going on here is the need to control the relationship
between selecting a font and modifying text properties -- font-size,
whether small caps, whether italic, colour, letter-spacing, maybe even
font-stretch -- based on the selection.




-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org



-- 
GitHub Notification of comment by liamquin
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/126#issuecomment-776958532 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:27:44 UTC