From 49ae5798ed793cc23f6eef4c2de6c98108c28f32 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Mon, 3 Jul 2023 21:22:33 +0700 Subject: [PATCH] tess lagi --- misskaty/plugins/fun.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/misskaty/plugins/fun.py b/misskaty/plugins/fun.py index 740b1d26..a053aea0 100644 --- a/misskaty/plugins/fun.py +++ b/misskaty/plugins/fun.py @@ -29,9 +29,7 @@ async def draw_meme_text(image_path, text): current_h, pad = 10, 5 if upper_text: for u_text in textwrap.wrap(upper_text, width=15): - low_test = draw.textlength(text=u_text, font=m_font) - LOGGER.info(low_test) - u_width, u_height = draw.textlength(text=u_text, font=m_font) + u_width, u_height = draw.textlength(text=u_text, font=m_font).split(".") draw.text( xy=(((i_width - u_width) / 2) - 1, int((current_h / 640) * i_width)), text=u_text, @@ -74,9 +72,7 @@ async def draw_meme_text(image_path, text): current_h += u_height + pad if lower_text: for l_text in textwrap.wrap(lower_text, width=15): - low_test = draw.textlength(text=l_text, font=m_font) - LOGGER.info(low_test) - u_width, u_height = draw.textlength(text=l_text, font=m_font) + u_width, u_height = draw.textlength(text=l_text, font=m_font).split(".") draw.text( xy=(