mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-30 01:00:02 +08:00
fix bug
This commit is contained in:
@@ -1493,10 +1493,11 @@ async def text2image(
|
||||
height = 0
|
||||
_tmp = BuildImage(0, 0, font=font, font_size=font_size)
|
||||
for x in text.split("\n"):
|
||||
x = x if x.strip() else "正"
|
||||
w, h = _tmp.getsize(x)
|
||||
height += h + _add_height
|
||||
width = width if width > w else w
|
||||
if x:
|
||||
w, _ = _tmp.getsize(x)
|
||||
_, h = _tmp.getsize("正")
|
||||
height += h + _add_height
|
||||
width = width if width > w else w
|
||||
width += pw
|
||||
height += ph
|
||||
A = BuildImage(
|
||||
|
||||
Reference in New Issue
Block a user