|
@@ -300,7 +300,7 @@ def file_prepare_v2(name, name_hash,text_content,image_urls):
|
|
|
txt2image_title(name, dir_title+name_hash+".png")
|
|
|
|
|
|
def txt2image(content, save_target):
|
|
|
- unicode_text = content
|
|
|
+ unicode_text = trim_punctuation(content)
|
|
|
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) )
|
|
@@ -310,7 +310,7 @@ def txt2image(content, save_target):
|
|
|
canvas.save(save_target, "PNG")
|
|
|
|
|
|
def txt2image_title(content, save_target):
|
|
|
- unicode_text = trim_punctuation(content)
|
|
|
+ unicode_text =content
|
|
|
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) )
|