ming 3 lat temu
rodzic
commit
5b4b581a15
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      main.py

+ 4 - 3
main.py

@@ -20,7 +20,8 @@ import math
 import hashlib
 import re
 import urllib.request
-
+#service nginx restart
+#
 
 
 app = FastAPI()
@@ -300,7 +301,7 @@ def file_prepare_v2(name, name_hash,text_content,image_urls):
 
 def txt2image(content, save_target):
     unicode_text = content
-    font = ImageFont.truetype(font="msjh.ttf", size=26)
+    font = ImageFont.truetype(font="msjh.ttf", size=19)
     text_width, text_height = font.getsize(unicode_text)
     canvas = Image.new('RGBA', (500, 500), (255, 0, 0, 0) )
     draw = ImageDraw.Draw(canvas)
@@ -310,7 +311,7 @@ def txt2image(content, save_target):
 
 def txt2image_title(content, save_target):
     unicode_text = content
-    font = ImageFont.truetype("font.ttf", 40,encoding='big5')
+    font = ImageFont.truetype("font.ttf", 25,encoding='big5')
     text_width, text_height = font.getsize(unicode_text)
     canvas = Image.new('RGBA', (500, 500), (255, 0, 0, 0) )
     draw = ImageDraw.Draw(canvas)