【发布时间】:2020-10-27 20:41:11
【问题描述】:
我在 Wand 中使用以下内容
with Image(width=width, height=height) as canvas:
left, top, width, height = 53, 247, 918, 78
with Drawing() as context:
context.fill_color = 'transparent'
context.rectangle(left=left, top=top, width=width, height=height)
font = Font('Montserrat-Regular.ttf', 0, "white")
context(canvas)
canvas.caption(row['DetailText'],
left=left, top=top, width=width, height=height, font=font, gravity='center')
canvas.save(filename='result.png')
效果很好。我想在 row['DetailText'] 中的文本前面加上“NOTES”一词,并以粗体显示。有没有办法做到这一点?
【问题讨论】: