Re: [csswg-drafts] [css-fonts-5] Add glyph scaling override descriptor to @font-face (#6075)

The CSS Working Group just discussed `[css-fonts-5] Add glyph scaling override descriptor to @font-face`, and agreed to the following:

* `RESOLVED: Add a size-adjust descriptor to @fontface, accepting a %. Applies a scale factor. Impacts all associated metrics of the font, including the outlinet b/c does not effect computed fonts size does not effect em`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [css-fonts-5] Add glyph scaling override descriptor to @font-face<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/6075#issuecomment-799915767<br>
&lt;chrishtr> q+<br>
&lt;dael> fantasai: Prop add a descriptor to fontface which accepts %. Scales computed fonts size before select font face. Effects all metrics and glyph outlines, but not computed font size.<br>
&lt;chris> q+<br>
&lt;dael> fantasai: size-adjust is suggested name b/c same as font-size-adjust in working<br>
&lt;dael> florian: Do you mean used font size is scaled?<br>
&lt;dael> fantasai: Yes<br>
&lt;dael> fantasai: Take computed font size, scale, but don't change computed font size<br>
&lt;dael> fantasai: 2 use cases. One is what advance-override tried which is the pitch of the font on the page scaling.<br>
&lt;dael> fantasai: The other reason to add is the glyphs in a different font for same font size look different sizes. We have font-size-adjust to equalize x height, but only works for writing modes where x-height matters. having a manually managed scaling allows authors to do size normalization for other writing systems and other aspects of font design<br>
&lt;dael> fantasai: Doesn't have a11y or i18n problems advance-override had<br>
&lt;dael> TabAtkins: Making nearly identical to font-size-adjust. Can we fold it in?<br>
&lt;chris> no we can't<br>
&lt;dael> fantasai: This is adescriptor.<br>
&lt;dael> TabAtkins: Nevermind. Cool<br>
&lt;Rossen_> ack chrishtr<br>
&lt;dael> chrishtr: fantasai, there's an issue about multiplying asc and desc<br>
&lt;dael> chrishtr: When used with line-height:normal<br>
&lt;dael> fantasai: Yes, asc and desc would get multiplied. If you want stable line-height you shouldn't use normal since that pulls things out of the font.<br>
&lt;dael> chrishtr: You would expect authors to apply asc overrides to counter effect?<br>
&lt;dael> fantasai: size-adjust needs to scale all font metrics. Not jsut for font-fallback, but other purposes. In case where; if you don't want to scale the advance for some reason you would unscale using asc and desc override properties<br>
&lt;florian> q?<br>
&lt;dael> fantasai: Most places where people care about this level of precision they are likely to not be using normal b/c you would have different line-heights for fallbacks. If you care a lot about precision of typesetting you'll use line-height:number<br>
&lt;fantasai> s/just/just used/<br>
&lt;Rossen_> ack chris<br>
&lt;myles> q+<br>
&lt;dael> chris: I wanted to point out we should have ex in spec. i can create. show with unicode range. For Arabic bigger, Thai smaller...that's an interesting use case. Want different normalization depending on script and this allows it. Interesting additional use case.<br>
&lt;Rossen_> ack myles<br>
&lt;dael> myles: We're going to have to make sure we define what happens when @fontface has this and ascent-override. Not hard, jsut have to decide<br>
&lt;dael> fantasai: For that question, all metrics overrides you apply as if they are what came in font and size0adjust is right before you select your font. You want to do that b/c when setting asc override you're trying to match to a point on the glyph, not arbitrary, and that needs to scale w/ glyph. If you scale the glyph and not asc it will be weird<br>
&lt;dael> myles: A few minutes ago you desc there were problems with font-size override property<br>
&lt;dael> fantasai: You mean advance-override?<br>
&lt;dael> myles: font-size-adjust<br>
&lt;dael> fantasai: Yeah, scales based on x-factor which doesn't help with something like Thai<br>
&lt;dael> myles: I check mdn and only one browser supports font-size-adjust. Should we deprecate that?<br>
&lt;dael> chris: It's a bit different. This is a %. We could harmonize. Could do in new descriptor rather than property. Not sure it makes sense to harmonize.<br>
&lt;dael> chris: If suggesting deprecate font-size-adjust I think it's a separate issue, but reasonable maybe<br>
&lt;dael> myles: I can open a separate issue<br>
&lt;dael> Rossen_: I was about to ask if these are additional clarifications we can work separately and sounds like they are<br>
&lt;Rossen_> q?<br>
&lt;dael> Rossen_: Any additional comments?<br>
&lt;dael> Rossen_: If not, summary of prop?<br>
&lt;dael> fantasai: Prop: Add a size-adjust descroptor to @fontface, acceptings a %. Applies a scale factor. Impacts all associated metrics of the font, including the outline. b/c does nto effect computed fonts size does not effect em<br>
&lt;dael> Rossen_: Objections?<br>
&lt;dael> jfkthame: Can we bikeshed name?<br>
&lt;dael> Rossen_: On the issue?<br>
&lt;dael> jfkthame: Okay<br>
&lt;dael> myles: Note sure I agree it wouldn't effect line-height<br>
&lt;dael> fantasai: DOesn't effect computed fonts size. Line-height is caluclated against that. THat's intentional<br>
&lt;dael> myles: I'll open an issue<br>
&lt;dael> Rossen_: Thanks myles. If you are concerned for the current resolution and don't think it's separate we can discuss now<br>
&lt;florian> [I think it would affect line-height: normal, but not line-height otherwise]<br>
&lt;dael> myles: I don't think need to now.<br>
&lt;dael> myles: I'd appriciate removing that part from resolution<br>
&lt;dael> fantasai: integral to getting this to work. line-height is a number, not a number per font. this is a per font scale factor. You cna't have it scale line-height. You can have it scale asc and desc but line-height has to be single, not array<br>
&lt;dael> myles: Thinking about normal<br>
&lt;dael> fantasai: Does effect normal<br>
&lt;dael> myles: Okay. Doesn't effect line height with a number. Does effect normal<br>
&lt;dael> Rossen_: Obj?<br>
&lt;chrishtr> \o/<br>
&lt;dael> RESOLVED: Add a size-adjust descriptor to @fontface, accepting a %. Applies a scale factor. Impacts all associated metrics of the font, including the outlinet b/c does not effect computed fonts size does not effect em<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6075#issuecomment-801224623 using your GitHub account


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

Received on Wednesday, 17 March 2021 16:26:50 UTC