Canvas Constructor

    let welcome =  new Canvas(1000, 300) //X = width, Y = height
    .addImage(background.body, 0, 0, 1000, 300)
    .setColor('#C0C0C0')
    .setTextFont('30px Royale')
    .setTextAlign('center')
    .addText(`WELCOME TO ${message.guild.name}.`, 600, 240, 200)
    .setColor('#C0C0C0')
    .setTextFont('30px Bold Oblique')
    .setTextAlign('center')
    .addText(`${message.author.tag} You Are Now ${message.guild.memberCount}th User.`, 600, 270, 200)
    .addImage(server_icon.body, 904, 105, 86, 86)
    .addRoundImage(avatar.body, 40, 29, 245, 245, 121) // buffer, x, y, width, height, radius = 10
    .toBuffer();

Not Showing Specified Font Style Showing Default font
even after i specified this working on editor vscode
Help

1 Like

Help i can’t use registerfont with canvas i need to change whole code -_-

Is the target font locateable on the machine? If not, try specifying a file path. It would also help to know what library your using.

1 Like