Re: [csswg-drafts] [css-fonts] extend font-size-adjust to take a pair of values: <metric> <number> (#6160)

TMI about ideographic, but needs to be considered: there are multiple relevant metrics. They're mostly equal to 1em in _most_ fonts, but for non-square ideographic fonts they actually do differ.

The `ideographic` keyword in `text-edge` references the `ideo` and `idtp` baselines. The distance between these two would be what you'd want to measure if we imported it as a possibility for `font-size-adjust`. But technically, there are two metrics involved here, one from the horizontal writing mode tables and one from the vertical writing mode tables. If we add this value, we need to be clear that its computation depends on writing mode. But I'm not sure it's needed; afaik, it will almost always be 1em.

The `ic` unit references the ideographic character advance, specifically by pulling out the advance of 水. It responds to changes in writing mode so if you have a squat font it'll be longer in horizontal writing modes than in vertical ones. My suggestion would be to define `ic` likewise computing based on the writing mode. This means that `font-size-adjust` with the same font might calculate different adjustment factors depending on the `writing-mode`, if one of the fonts affected is non-square. But that's what will give the intended result of normalizing the advance.

We could also have `ic-height` and `ic-width` separately, but I suspect `ic-height` would be confused for the `ideographic` metric, and I'm not sure there's much of a use case for using an axis-specific value...

The third metric is the ideographic character face metrics, which correspond to the `icft` and `icfb` baselines and is typically slightly smaller than 1em. This metric is represented using the `ideographic-ink` keyword in `text-edge`, and is also what we use for drop-cap sizing. Normalizing these across fonts would account for varying amounts of built-in spacing / size of the character within the em square. I don't know how much this is a desired feature; it might be useful to ask people who work with CJK fonts.

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


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

Received on Tuesday, 6 April 2021 23:24:22 UTC