From 8be24c89eaa33507ee3d17514273bc5134b2b965 Mon Sep 17 00:00:00 2001 From: "whvcse@foxmail.com" Date: Sun, 25 Aug 2019 15:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=86=85=E7=BD=AE=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E3=80=81=E8=B4=9D=E5=A1=9E=E5=B0=94=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=E3=80=81=E7=AE=97=E6=9C=AF=E9=AA=8C=E8=AF=81=E7=A0=81=E3=80=81?= =?UTF-8?q?base64=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- pom.xml | 2 +- src/main/java/com/wf/captcha/base/Captcha.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7e4bbda..109a20e 100644 --- a/README.md +++ b/README.md @@ -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 { com.github.whvcse EasyCaptcha - 1.6.1 + 1.6.2 ``` ### 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添 com.github.whvcse EasyCaptcha 1.6.1 - ${basedir}/libs/EasyCaptcha-1.6.1.jar + ${basedir}/libs/EasyCaptcha-1.6.2.jar ``` diff --git a/pom.xml b/pom.xml index d7d9683..34b173f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.wf easy-captcha - 1.6.1-RELEASE + 1.6.2-RELEASE jar EasyCaptcha diff --git a/src/main/java/com/wf/captcha/base/Captcha.java b/src/main/java/com/wf/captcha/base/Captcha.java index 0d56679..9ca2d43 100644 --- a/src/main/java/com/wf/captcha/base/Captcha.java +++ b/src/main/java/com/wf/captcha/base/Captcha.java @@ -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() {