-
Notifications
You must be signed in to change notification settings - Fork 716
[css-fonts-4] @font-face src tech() multiple value syntax #9054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@jfkthame could you confirm Gecko behavior, please? Thanks! |
The spec text re Selecting items in the src says that:
(my emphasis), so it's definitely supposed to be "A and B". What's a bit confusing, though, is that in Parsing the src descriptor, the spec says:
which means that if any of the requested technologies is unsupported, the source is not added to the list at all; and therefore the need to "skip downloading a font resource" shouldn't arise as it won't be in the list. (Parsing the descriptor happens before there's any question of selecting items in the source list.) And if the list ends up empty because the only source (or all sources) were dropped as unsupported, the spec says this is a parse error. This seems a bit strange to me; it's not (in my mind) a parse error, it's a perfectly valid rule that doesn't happen to provide any usable resources. I'm sure this must have been discussed at some point, but don't recall the details offhand. Anyhow, I'll take a look at what Gecko is doing.... |
ah, so you are rejecting the font, based on tech/format, on loading and not on parsing, that explains why I've created an issue about that a while ago #8793. cdoublev was wondering the same I guess. |
Yeah -- from testing in the web console, it looks like Gecko is doing what I'd intuitively expect: the src descriptor is valid provided the argument(s) to the Some experiments:
|
Uh oh!
There was an error while loading. Please reload this page.
tech()
accepts multiple values, being@font-face src
descriptor syntax:<url> [ format(<font-format>)]? [ tech( <font-tech>#)]? | local(<font-face-name>)
Spec says:
However, I'm confused if an engine should validate
tech(A, B)
only if it supports bothA
andB
technologies, or if it supportsA
orB
techonologies.I think it makes more sense to be
A
andB
although I've interpreted asA
orB
at first and implemented it that way for WebKit. This resulted in a bug filed at https://bugs.webkit.org/show_bug.cgi?id=258948.I've added a test case locally on font-face-src-tech enforcing the
and
behavior. It seems that Blink behavior is alreadyand
but Gecko behavior isor
, but it can be that it is failing for another reason for Gecko.WPT export attempt : web-platform-tests/wpt#40950
I'd like to clarify what's the expected behavior here.
Use case:
The text was updated successfully, but these errors were encountered: