ming 4 年之前
父節點
當前提交
a3d9449c28
共有 3 個文件被更改,包括 1 次插入1 次删除
  1. 二進制
      .DS_Store
  2. 1 1
      main.py
  3. 二進制
      msjh.ttf

二進制
.DS_Store


+ 1 - 1
main.py

@@ -300,7 +300,7 @@ def file_prepare_v2(name, name_hash,text_content,image_urls):
 
 def txt2image(content, save_target):
     unicode_text = content
-    font = ImageFont.truetype("font.ttf", 26,encoding='big5')
+    font = ImageFont.truetype(font="msjh.ttf", size=26)
     text_width, text_height = font.getsize(unicode_text)
     canvas = Image.new('RGBA', (500, 500), (255, 0, 0, 0) )
     draw = ImageDraw.Draw(canvas)

二進制
sub_font.ttf → msjh.ttf