Browse Source

验证码图片自定义字体

andy 1 year ago
parent
commit
3085cda3b3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      mainFactory/src/main/java/org/bfkj/utils/GenerateImage.java

+ 1 - 0
mainFactory/src/main/java/org/bfkj/utils/GenerateImage.java

@@ -59,6 +59,7 @@ public class GenerateImage {
 //            改变字体大小
             font = font.deriveFont((float) (HEIGHT - 10));
         }
+        font.deriveFont((float) (HEIGHT - 10));
         graphics.setFont(font);
 
         int desX, desY, distance = 16;