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
None => return,// offscreen canvas doesn't have a placeholder canvas
};
OffscreenCanvasRenderingContext2D delegates to CanvasRenderingContext2D's SetFont implementation, which just calls this method and ends up passing a None value for the canvas.
Instead of an HTMLCanvasElement, we should pass a GlobalScope and CanvasRenderingContext2D can use self.global() instead. This should make a lot of tests in ./mach test-wpt tests/wpt/tests/html/canvas/offscreen/text start to pass (you will need to update the expectations).
I've already done a couple of issues on this repo, but canvas is still uncharted territory. I'll take it as I don't think I'm quite at the 'E-more-complex' level just yet
Activity
servo-highfive commentedon Nov 13, 2026
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in Zulip.
If you intend to work on this issue, then add
@servo-highfive: assign meto your comment, and I'll assign this to you. 😄Please read and follow our AI Usage Policy:
mwja commentedon Nov 13, 2026
I've already done a couple of issues on this repo, but canvas is still uncharted territory. I'll take it as I don't think I'm quite at the 'E-more-complex' level just yet
@servo-highfive assign me
servo-highfive commentedon Nov 13, 2026
Hey @mwja! Thanks for your interest in working on this issue. It's now assigned to you!
script: correctly set fonts for offscreen canvases (servo#49915)
script: correctly set fonts for offscreen canvases (servo#49915)