RESOLVED FIXED 258948
Multiple keywords for tech()
https://bugs.webkit.org/show_bug.cgi?id=258948
Summary Multiple keywords for tech()
Oliver Williams
Reported 2023-07-06 14:54:51 PDT
The following code works correctly in Safari and loads an OpenType-SVG font: @font-face { font-family: "ComicColor"; src: url("ComicColor-SVG.woff2") format(woff2) tech(color-SVG); } However, the following code should load the OpenType-SVG font in Safari but instead it loads the COLRv1 font (which Safari does not support). @font-face { font-family: "ComicColor"; src: url("ComicColor-COLRv1.woff2") format(woff2) tech(variations, color-COLRv1), url("ComicColor-SVG.woff2") format(woff2) tech(color-SVG); } From reading the spec, it seems that tech() is meant to accept a comma-seperated list of values. Is it this that is confusing Safari and getting it to load the wrong font? When I only use one value for tech() things work as they should: @font-face { font-family: "ComicColor"; src: url("ComicColor-COLRv1.woff2") format(woff2) tech(color-COLRv1), url("ComicColor-SVG.woff2") format(woff2) tech(color-SVG); }
Attachments
Vitor Roriz
Comment 1 2023-07-10 07:57:07 PDT
Thanks for reporting that. I think you are right. I've got confused by https://github.com/web-platform-tests/wpt/blob/0a2fec9de6/css/css-fonts/parsing/font-face-src-tech.html#L45 : >> // Unsupported technology (for example: no browser has incremental transfer yet), might be >> // dropped from the list, next component of the list should be accepted." The list here is probably referring to the `src list` and not the list of tech() arguments. Therefore we are currently validating it if we can handle at least one tech provided for a descriptor, instead of all of them. We are missing such a invalid test case in WPT, I'll add one and fix that.
Radar WebKit Bug Importer
Comment 2 2023-07-10 08:55:53 PDT
Vitor Roriz
Comment 3 2023-07-10 09:14:23 PDT
EWS
Comment 4 2023-07-13 07:36:35 PDT
Committed 266032@main (165f4f7106fc): <https://commits.webkit.org/266032@main> Reviewed commits have been landed. Closing PR #15697 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.