You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"If any of them fail to parse correctly, reject font face’s [[FontStatusPromise]] with a DOMException named "SyntaxError", set font face’s corresponding attributes to the empty string, and set font face’s status attribute to "error". Otherwise, set font face’s corresponding attributes to the serialization of the parsed values."
This section should specify when there is a parsing failure, if the all of the font face's attributes should be empty string, or just those that failed to parse. Currently Firefox and Chrome seem to set all attributes to some default string when there is a parsing error, rather than an empty string, so some clarification to this section would be beneficial to have the same behavior across all browsers.
The text was updated successfully, but these errors were encountered:
I don't think that was my original intention, but the spec is unclear, and it also doesn't really matter. So yes, I agree the spec should match impls here.
However, note:
Currently Firefox and Chrome seem to set all attributes to some default string when there is a parsing error,
which I've confirmed is true. Does Safari do that, @litherum, or set to an empty string?
https://drafts.csswg.org/css-font-loading/#dom-fontface-fontface
Section 2.1:
"If any of them fail to parse correctly, reject font face’s [[FontStatusPromise]] with a DOMException named "SyntaxError", set font face’s corresponding attributes to the empty string, and set font face’s status attribute to "error". Otherwise, set font face’s corresponding attributes to the serialization of the parsed values."
This section should specify when there is a parsing failure, if the all of the font face's attributes should be empty string, or just those that failed to parse. Currently Firefox and Chrome seem to set all attributes to some default string when there is a parsing error, rather than an empty string, so some clarification to this section would be beneficial to have the same behavior across all browsers.
The text was updated successfully, but these errors were encountered: