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

[Gecko Bug 1778908] Implement the fontKerning attribute for Canvas2d text. #34838

Merged
merged 1 commit into from Jul 14, 2022

Conversation

moz-wptsync-bot
Copy link
Collaborator

Per spec, the value of fontKerning should be an enum, not a string, but currently we handle
all the keyword-valued canvas attributes in this way. We may want to convert them to enums
(which will mean that unrecognized values throw an error instead of being ignored), but I
think that should be done for all the attributes together as a separate bug. For now, using
a string here provides consistency with the rest of the canvas APIs.

Note that Blink's current implementation and the existing WPT tests have some problems:
they treat the values of fontKerning as case-insensitive, which is wrong. I have filed
https://bugs.chromium.org/p/chromium/issues/detail?id=1343333 about this.

Differential Revision: https://phabricator.services.mozilla.com/D151755

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1778908
gecko-commit: 28bb76d444f5be41d2a112e7073ea1d0b0a343ec
gecko-reviewers: gfx-reviewers, aosmond, emilio

Per spec, the value of fontKerning should be an enum, not a string, but currently we handle
all the keyword-valued canvas attributes in this way. We may want to convert them to enums
(which will mean that unrecognized values throw an error instead of being ignored), but I
think that should be done for all the attributes together as a separate bug. For now, using
a string here provides consistency with the rest of the canvas APIs.

Note that Blink's current implementation and the existing WPT tests have some problems:
they treat the values of fontKerning as case-insensitive, which is wrong. I have filed
https://bugs.chromium.org/p/chromium/issues/detail?id=1343333 about this.

Differential Revision: https://phabricator.services.mozilla.com/D151755

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1778908
gecko-commit: 28bb76d444f5be41d2a112e7073ea1d0b0a343ec
gecko-reviewers: gfx-reviewers, aosmond, emilio
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

@moz-wptsync-bot moz-wptsync-bot merged commit d687cf4 into master Jul 14, 2022
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1778908 branch July 14, 2022 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants