1
0
mirror of https://github.com/whvcse/EasyCaptcha.git synced 2024-11-13 13:19:19 +08:00

增加内置字体、贝塞尔曲线、算术验证码、base64输出

This commit is contained in:
whvcse@foxmail.com 2019-08-25 15:29:08 +08:00
parent 1d9dc73bda
commit 8be24c89ea
3 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ allprojects {
在项目的build.gradle中添加
```text
dependencies {
compile 'com.github.whvcse:EasyCaptcha:1.6.1'
compile 'com.github.whvcse:EasyCaptcha:1.6.2'
}
```
@ -83,14 +83,14 @@ dependencies {
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>EasyCaptcha</artifactId>
<version>1.6.1</version>
<version>1.6.2</version>
</dependency>
</dependencies>
</project>
```
### 3.3.jar包下载
[EasyCaptcha-1.6.1.jar](https://gitee.com/whvse/EasyCaptcha/releases)
[EasyCaptcha-1.6.2.jar](https://gitee.com/whvse/EasyCaptcha/releases)
maven导入jar包在项目根目录创建`libs`文件夹然后pom.xml添加如下
```
@ -98,7 +98,7 @@ maven导入jar包在项目根目录创建`libs`文件夹然后pom.xml添
<groupId>com.github.whvcse</groupId>
<artifactId>EasyCaptcha</artifactId>
<version>1.6.1</version>
<systemPath>${basedir}/libs/EasyCaptcha-1.6.1.jar</systemPath>
<systemPath>${basedir}/libs/EasyCaptcha-1.6.2.jar</systemPath>
</dependency>
```

View File

@ -5,7 +5,7 @@
<groupId>org.wf</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.1-RELEASE</version>
<version>1.6.2-RELEASE</version>
<packaging>jar</packaging>
<name>EasyCaptcha</name>

View File

@ -271,7 +271,7 @@ public abstract class Captcha extends Randoms {
}
public void setFont(int font, int style, float size) throws IOException, FontFormatException {
this.font = Font.createFont(Font.TRUETYPE_FONT, new File(getClass().getResource("/" + FONT_NAMES[font]).getFile())).deriveFont(style, size);
this.font = Font.createFont(Font.TRUETYPE_FONT, getClass().getResourceAsStream("/" + FONT_NAMES[font])).deriveFont(style, size);
}
public int getLen() {