|
@@ -2309,7 +2309,8 @@ class generatePictureCodeView(TemplateView):
|
|
|
|
|
|
# --------生成随机验证码,设置字体格式,大小等属性------------
|
|
|
draw = ImageDraw.Draw(img)
|
|
|
- kumo_font = ImageFont.truetype("arial.ttf", 40, encoding="unic") # 设置字体
|
|
|
+ path = "../Ansjer/file/font/simhei.ttf"
|
|
|
+ kumo_font = ImageFont.truetype(path, 40, encoding="unic") # 设置字体
|
|
|
print("字体可以")
|
|
|
valid_code_str = ''
|
|
|
for i in range(5):
|