增加内置字体、贝塞尔曲线、算术验证码、base64输出
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user