ming %!s(int64=4) %!d(string=hai) anos
pai
achega
a3d9449c28
Modificáronse 3 ficheiros con 1 adicións e 1 borrados
  1. BIN=BIN
      .DS_Store
  2. 1 1
      main.py
  3. BIN=BIN
      msjh.ttf

BIN=BIN
.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)

BIN=BIN
sub_font.ttf → msjh.ttf