Comments (4)
Check issue #31 the problem is with skia-canvas, use v2 for now. v2.4.0 (#34) will have all the features of v3 in node-canvas.
from captcha-canvas.
same problem after i use v2.4.0
https://prnt.sc/2461xlq
how i can use external font using font path
like this
const { registerFont } = require('canvas')
registerFont('./Structures/fonts/Genta.ttf', { family: 'Genta' })
this is my code
const captcha = new CaptchaGenerator()
.setDimension(150, 450)
.setCaptcha({font: "Genta", size: 60, color: "deeppink" })
.setDecoy({ opacity: 0.5 })
.setTrace({ color: "deeppink" });
const captchaAttachment = captcha.generateSync(
await captcha.png,
"captcha.png"
);
interaction.reply({ files: [captchaAttachment], content: `Code: ${captcha.text}` });
from captcha-canvas.
check version correctly. v2.4.0 is not yet released it's still a draft. BTW the way you use registerFont() is correct so the only issue is custom font do not support in your system.
from captcha-canvas.
Close because of inactivity I am going to assume that problem is resolved.
from captcha-canvas.
Related Issues (20)
- My VPS partition failed, and I'm reinstalling dependencies HOT 2
- repl.it issue HOT 6
- fonts HOT 3
- RuntimeError: libfontconfig.so.1: cannot open shared object file: No such file or directory HOT 4
- Image captcha not show words HOT 8
- Image captcha not show words
- Specified module could not be found. HOT 1
- Displaying undefined on 4 characters HOT 8
- "MODULE NOT FOUND' captcha-canvas HOT 4
- skia-canvas module not found HOT 1
- feature request: setCaptcha support to pass SetCaptchaOption array HOT 5
- .setBackground() not working (v2.3.1) HOT 3
- WARNING: lavapipe is not a conformant vulkan implementation, testing use only. HOT 10
- Could not find find "Cargo.toml". Did not copy cdylib:skia-canvas HOT 7
- invalid ELF header HOT 7
- Text not appearing in Captcha HOT 2
- letters and decoys not showing up HOT 1
- errors in docker HOT 1
- Cannot find module 'XXX/../package.json' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from captcha-canvas.