[css-fonts] Support avar2 within tech() to support using the next generation of variable fonts tech
https://web.dev/articles/variable-fonts#loading_variable_font_files gives this CSS example for loading Roboto Flex, an advanced variable font:
@font-face {
font-family: 'Roboto Flex';
src: url('RobotoFlex-VF.woff2') format('woff2-variations');
src: url('RobotoFlex-VF.woff2') format('woff2') tech('variations');
font-weight: 100 1000;
font-stretch: 25% 151%;
}
However, a new version is under development, https://github.com/googlefonts/roboto-flex-avar2 , and this uses the new avar v2 table instead of the current v1 one, as pioneered in https://github.com/harfbuzz/boring-expansion-spec and can be inspected and authored with https://lorp.github.io/fencer/src/fencer.html
Therefore I would like to be able to do this in my CSS
@font-face {
font-family: 'Roboto Flex';
src: url('RobotoFlex-VF-avar2.woff2') format('woff2-variations-avar2');
src: url('RobotoFlex-VF-avar2.woff2') format('woff2') tech('variations-avar2');
src: url('RobotoFlex-VF.woff2') format('woff2-variations');
src: url('RobotoFlex-VF.woff2') format('woff2') tech('variations');
font-weight: 100 1000;
font-stretch: 25% 151%;
}
@lorp @simoncozens @twardoch
@jfkthame @drott
Yes please
I would be in favor of adding avar2 to the <font-tech> production in
https://drafts.csswg.org/css-fonts/#font-face-src-parsing
Then the example would work with
src: url('RobotoFlex-VF-avar2.woff2') format(woff2) tech(avar2) or
src: url('RobotoFlex-VF-avar2.woff2') format(woff2) tech(variations,avar2)
What is needed to make this happen? :)
https://github.com/w3c/csswg-drafts/labels/Agenda%2B to get resolution on this.
I am in favor.
Thanks @svgeesus :) When might we here hear any news? :D
When might we here hear any news?
When the agenda item gets discussed, it will be reported here.
For a specification link, OT 1.9.1 still says:
Major version number of the axis variations table — set to 1.
Which OT version will define v2 of avar?
I see avar v2 in the Committee Draft of the 5th edition ISO/IEC 14496-22/CD "Open Font Format" which went for ballot in August this year.
@vlevantovsky is there an estimated timeline for this to make IS?
is there an estimated timeline for this to make IS?
The progression of the document depends on the ballot responses. If this CD is approved with no major changes, then the document will likely be finalized / published by the end of 2025. If, however, the CD comments will warrant substantial technical changes, then the second CD ballot may be issued, and the overall progression of the document will be delayed until mid-2026.
The question then is whether to add this to CSS Fonts now (with a temporary pointer to the avar v2 proposal on GitHub) or whether to wait until it is ratified. It seems there is implementer interest, so it would be better to add it now.
I'm seeing only positive feedback to adding tech(avar2). Is anyone opposed?
If there is no negative feedback then I will add it so that the spec doesn't lag behind active implementations (with a temporary reference, for now).
Another question is whether to add it to CSS Fonts 4 Font Technologies and Formats or to a new, Font Technologies and Formats section in CSS Fonts 5. Given the level of spec maturity, my feeling is to add it to Fonts 5.
@svgeesus could this be an async resolution?
@svgeesus could this be an async resolution?
@astearns yes, certainly
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: Add avar2 to the <font-tech> production
RESOLVED: Add avar2 to the <font-tech> production
Great to hear