mirror of
https://github.com/dromara/tianai-captcha.git
synced 2026-05-07 06:04:34 +08:00
设置加载默认资源时, 给文字点选验证码加默认的字体包
This commit is contained in:
@@ -66,6 +66,11 @@ public class DefaultBuiltInResources {
|
|||||||
template1.put(TEMPLATE_FIXED_IMAGE_NAME, new Resource(type, finalPathPrefix.concat("/rotate_1/fixed.png")));
|
template1.put(TEMPLATE_FIXED_IMAGE_NAME, new Resource(type, finalPathPrefix.concat("/rotate_1/fixed.png")));
|
||||||
resourceStore.addTemplate(CaptchaTypeConstant.ROTATE, template1);
|
resourceStore.addTemplate(CaptchaTypeConstant.ROTATE, template1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 字体包
|
||||||
|
defaultTemplateResource.put(FontCache.FONT_TYPE, resourceStore -> {
|
||||||
|
resourceStore.addResource(FontCache.FONT_TYPE,new Resource(type, finalPathPrefix.concat("/fontS/SIMSUN.TTC")));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user