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
Currently setting ctx.fontVariantCaps has no effect (and is not reflected in TypeScript types), and using the ctx.font property to set a font variant is also ignored.
Code
import{writeFile}from"fs/promises";import{Canvas}from"@napi-rs/canvas";constcanvas=newCanvas(400,400);constctx=canvas.getContext("2d");ctx.fillStyle="white";ctx.fillRect(0,0,canvas.width,canvas.height);ctx.fillStyle="black";ctx.font="small-caps 48px sans-serif";// This works in the browserctx.fillText("Test",10,50);awaitwriteFile("./out.png",canvas.toBuffer("image/png"));
Expected
Actual
The text was updated successfully, but these errors were encountered:
Currently setting
ctx.fontVariantCaps
has no effect (and is not reflected in TypeScript types), and using thectx.font
property to set a font variant is also ignored.Code
Expected
Actual
The text was updated successfully, but these errors were encountered: