Skip to content

Commit

Permalink
Fix invalid empty text width (pythonarcade#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasZahradnik committed Apr 10, 2020
1 parent f81f151 commit c5a5aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arcade/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def draw_text(text: str,
if isinstance(color, list):
color = cast(RGBA, tuple(color))
draw.multiline_text((image_start_x, image_start_y), text, color, align=align, font=font)
image = image.resize((width // scale_down, text_height // scale_down), resample=PIL.Image.LANCZOS)
image = image.resize((max(1, width // scale_down), text_height // scale_down), resample=PIL.Image.LANCZOS)

text_sprite = Sprite()
text_sprite._texture = Texture(key)
Expand Down

0 comments on commit c5a5aa3

Please sign in to comment.