Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mewebstudio committed Aug 2, 2023
1 parent 283d098 commit 61abd95
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,26 @@ To use the `Captcha` class to generate captcha images, follow these steps:
```java
Config customConfig = new Config();
// Customize the configuration properties as needed
customConfig.setFonts(new String[]{
"src/main/resources/fonts/Roboto-Regular.ttf",
"src/main/resources/fonts/OpenSans-Regular.ttf",
"src/main/resources/fonts/Lato-Regular.ttf"
});
customConfig.setDark(true);
Captcha captcha = new Captcha(customConfig);
```

or

```java
captcha.getConfig().setFonts(new String[]{
"src/main/resources/fonts/Roboto-Regular.ttf",
"src/main/resources/fonts/OpenSans-Regular.ttf",
"src/main/resources/fonts/Lato-Regular.ttf"
});
captcha.getConfig().setDark(true);
```

2. **Generate a Captcha:**

To generate a captcha image, call the `generate()` method on the `Captcha` instance:
Expand Down

0 comments on commit 61abd95

Please sign in to comment.