Skip to content

Commit

Permalink
Merge pull request #2254 from OsaAjani/fix-#2251
Browse files Browse the repository at this point in the history
Fix invalid option in docstring of TextClip, as mentionned in #2251
  • Loading branch information
Zulko authored Nov 24, 2024
2 parents 2e3c310 + bffc06c commit a19c813
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions moviepy/video/VideoClip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,6 @@ class TextClip(ImageClip):
font
Path to the font to use. Must be an OpenType font.
See ``TextClip.list('font')`` for the list of fonts you can use on
your computer.
text
A string of the text to write. Can be replaced by argument
Expand Down Expand Up @@ -1397,16 +1395,15 @@ class TextClip(ImageClip):
This is especially usefull for auto-compute size to give the text some
extra room.
bg_color
Color of the background. Default to None for no background. Can be
a RGB (or RGBA if transparent = ``True``) ``tuple``, a color name, or an
hexadecimal notation.
color
Color of the text. Default to "black". Can be
a RGB (or RGBA if transparent = ``True``) ``tuple``, a color name, or an
hexadecimal notation.
bg_color
Color of the background. Default to None for no background. Can be
a RGB (or RGBA if transparent = ``True``) ``tuple``, a color name, or an
hexadecimal notation.
stroke_color
Color of the stroke (=contour line) of the text. If ``None``,
Expand Down Expand Up @@ -1598,7 +1595,6 @@ def find_optimum_font_size(
return min_font_size - 1

try:
print("f", font)
_ = ImageFont.truetype(font)
except Exception as e:
raise ValueError(
Expand Down Expand Up @@ -1763,9 +1759,7 @@ def find_optimum_font_size(
# increment by half our text height, since we have to reference from
# middle line.
y += text_height / 2
print(y)

print(text_align)
draw.multiline_text(
xy=(x, y),
text=text,
Expand Down

0 comments on commit a19c813

Please sign in to comment.