Skip to content
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

Spec clarification: Are values in fontVariant & fontKerning case sensitive? #9445

Closed
yiyix opened this issue Jun 19, 2023 · 1 comment
Closed

Comments

@yiyix
Copy link
Contributor

yiyix commented Jun 19, 2023

In the current spec, it describes setting the font kerning value as the follows:

The fontKerning attribute's allowed keywords are as follows:
auto ..
normal ...
none ...

It doesn't say of these allowed keywords are case sensitive or case insensitive. i.e. do we accept 'Normal' as a keyword? would ctx.fontKerning = 'Normal' changes fontKerning to 'normal'? The CSS font Kerning and font variant keywords are case insensitive.

Note: The reason I bring it up is because the interop 2023 test case 2d.text.drawing.style.fontKerning.with.uppercase.html is expecting the input to be case sensitive.

@domenic
Copy link
Member

domenic commented Jun 19, 2023

FontKerning is defined as an IDL enumeration:

enum CanvasFontKerning { "auto", "normal", "none" };

Setting IDL enumerations to values that are not one of the defined values (e.g., "Normal") is a no-op, per https://webidl.spec.whatwg.org/#dfn-attribute-setter step 4.6.

Hope this helps!

@domenic domenic closed this as completed Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants