Shashank3736/captcha-canvas

Image captcha not show words

Le-Khuong opened this issue · 8 comments

We solved this in #31 Please check that issue first. If it doesn't work for you then show me the code also share the version of captcha-canvas you are using.

i think it is problem with my system font
image
and idk how to fixx it

and my code:

const { CaptchaGenerator } = require("captcha-canvas");
const {MessageAttachment} = require("discord.js")

const captcha = new CaptchaGenerator()
.setDimension(150, 450) 
.setCaptcha({color: '#1DAEEF'})
.setDecoy({opacity: 0.5})
.setTrace({color: '#1DAEEF'});

const captchaImageData = captcha.generateSync();
const captAttach = new MessageAttachment(captchaImageData , `captcha.png`)
message.channel.send(captAttach )

Your system must support skia-canvas try to install fontconfig in your system then try. Which OS you are using btw?

im using repl

also i have install skia-canvas and still not work

repl have some issues with skia-canvas in issue #31 the user have the same issues because he is using repl too.

oh ok thanks