mewebstudio / java-captcha-generator

Java Captcha Generator
MIT License
14 stars 5 forks source link

Example code doesn't work out of the box #3

Closed CharlesAnjos closed 11 months ago

CharlesAnjos commented 11 months ago

Hi, I've tried to implement this utility on a small project of mine. Tried to implement that example code and it didn't work. After a bit of headbanging, I've discovered that I needed to add custom configuration and then set a font that I had to include on the project so it could finally work. Is this by design or was there some dependency or config missing from my project? And if it is by design, shoudn't it be included in the complete example code of the readme? As it is, it's a bit confusing and might drive away people interested in using this project.

mewebstudio commented 11 months ago

Hello, yes it was designed this way. Information about font definition has already been given here: https://github.com/mewebstudio/java-captcha-generator#how-to-use

Example where the captcha code is generated: https://github.com/mewebstudio/java-captcha-generator#example

In this section, you must determine how you will use and verify the code in your application.

If you have a suggestion for documentation, you can send it as PR.