|
@@ -154,7 +154,7 @@ def txt2image(content, save_target,lang='zh'):
|
|
|
if lang=='zh':
|
|
|
font = ImageFont.truetype(font="font/DFT_B7.ttc", size=38)
|
|
|
else :
|
|
|
- font = ImageFont.load("arial.pil")
|
|
|
+ font = ImageFont.truetype(font="font/arial.ttf", size=38)
|
|
|
text_width, text_height = font.getsize(unicode_text)
|
|
|
canvas = Image.new('RGBA', (700, 500), (255, 0, 0, 0) )
|
|
|
draw = ImageDraw.Draw(canvas)
|
|
@@ -255,7 +255,7 @@ def generate_subtitle_image_ENG(name_hash,text_content):
|
|
|
def anchor_video_v2(name_hash,name,text_content, image_urls,avatar):
|
|
|
print(os.getcwd())
|
|
|
print('sub image made')
|
|
|
- file_prepare(name, name_hash, text_content,image_urls,0)
|
|
|
+ file_prepare(name, name_hash, text_content,image_urls)
|
|
|
sub_list=generate_subtitle_image(name_hash,text_content)
|
|
|
|
|
|
for fname in range(len(text_content)):
|