Skip to content

Commit

Permalink
fix AttributeError (#11556) (#11686)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatV authored Mar 27, 2024
1 parent 1914442 commit 454ed3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion StyleText/engine/text_drawers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def draw_text(self,
i = 0
while i < len(corpus):
char_i = corpus[i]
char_size = font.getsize(char_i)[0]
char_size = font.getbbox(char_i)[2]
# split when char_x exceeds char size and index is not 0 (at least 1 char should be wroten on the image)
if char_x + char_size >= width and i != 0:
text_input = np.array(bg).astype(np.uint8)
Expand Down

0 comments on commit 454ed3f

Please sign in to comment.