sreepathi-ravikumar commited on
Commit
dc0af05
·
verified ·
1 Parent(s): 4f18526

Update video.py

Browse files
Files changed (1) hide show
  1. video.py +1 -1
video.py CHANGED
@@ -61,7 +61,7 @@ def create_text_image(text,id,image_olst, image_size=(1280, 720), bg_color="whit
61
 
62
  y = (image_size[1] - total_height) // 2
63
  for line in best_lines:
64
- is_heading = line.strip().endswith("?") or line.strip().endswith(":")
65
  font_to_use = ImageFont.truetype(bold_font_path, best_font.size) if is_heading else best_font
66
  color_to_use = heading_color if is_heading else normal_color
67
 
 
61
 
62
  y = (image_size[1] - total_height) // 2
63
  for line in best_lines:
64
+ is_heading = line.strip().startswith("#") and (line.strip().endswith("?") or line.strip().endswith(":"))
65
  font_to_use = ImageFont.truetype(bold_font_path, best_font.size) if is_heading else best_font
66
  color_to_use = heading_color if is_heading else normal_color
67