mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-08 21:04:50 +00:00
tess lagi
This commit is contained in:
parent
fa409dc29e
commit
49ae5798ed
1 changed files with 2 additions and 6 deletions
|
|
@ -29,9 +29,7 @@ async def draw_meme_text(image_path, text):
|
||||||
current_h, pad = 10, 5
|
current_h, pad = 10, 5
|
||||||
if upper_text:
|
if upper_text:
|
||||||
for u_text in textwrap.wrap(upper_text, width=15):
|
for u_text in textwrap.wrap(upper_text, width=15):
|
||||||
low_test = draw.textlength(text=u_text, font=m_font)
|
u_width, u_height = draw.textlength(text=u_text, font=m_font).split(".")
|
||||||
LOGGER.info(low_test)
|
|
||||||
u_width, u_height = draw.textlength(text=u_text, font=m_font)
|
|
||||||
draw.text(
|
draw.text(
|
||||||
xy=(((i_width - u_width) / 2) - 1, int((current_h / 640) * i_width)),
|
xy=(((i_width - u_width) / 2) - 1, int((current_h / 640) * i_width)),
|
||||||
text=u_text,
|
text=u_text,
|
||||||
|
|
@ -74,9 +72,7 @@ async def draw_meme_text(image_path, text):
|
||||||
current_h += u_height + pad
|
current_h += u_height + pad
|
||||||
if lower_text:
|
if lower_text:
|
||||||
for l_text in textwrap.wrap(lower_text, width=15):
|
for l_text in textwrap.wrap(lower_text, width=15):
|
||||||
low_test = draw.textlength(text=l_text, font=m_font)
|
u_width, u_height = draw.textlength(text=l_text, font=m_font).split(".")
|
||||||
LOGGER.info(low_test)
|
|
||||||
u_width, u_height = draw.textlength(text=l_text, font=m_font)
|
|
||||||
|
|
||||||
draw.text(
|
draw.text(
|
||||||
xy=(
|
xy=(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue