ismdrobiul489 commited on
Commit
59fe149
·
1 Parent(s): 3dd9b6e

Update font sizes: heading 65px, fact text 53px, 4 words per line

Browse files
modules/fact_image/services/text_overlay.py CHANGED
@@ -29,8 +29,8 @@ class TextOverlay:
29
  PADDING_X = 60 # Horizontal padding
30
 
31
  # Font sizes
32
- HEADING_FONT_SIZE = 52
33
- TEXT_FONT_SIZE = 42
34
  LINE_SPACING = 1.3
35
 
36
  def __init__(self, font_path: Optional[str] = None):
@@ -72,12 +72,12 @@ class TextOverlay:
72
 
73
  return self._font_cache[cache_key]
74
 
75
- def _wrap_text(self, text: str, max_words_per_line: int = 5) -> str:
76
  """
77
  Wrap text for optimal display.
78
 
79
  Rules:
80
- - Max 5-6 words per line
81
  - Natural line breaks
82
  """
83
  words = text.split()
 
29
  PADDING_X = 60 # Horizontal padding
30
 
31
  # Font sizes
32
+ HEADING_FONT_SIZE = 65
33
+ TEXT_FONT_SIZE = 53
34
  LINE_SPACING = 1.3
35
 
36
  def __init__(self, font_path: Optional[str] = None):
 
72
 
73
  return self._font_cache[cache_key]
74
 
75
+ def _wrap_text(self, text: str, max_words_per_line: int = 4) -> str:
76
  """
77
  Wrap text for optimal display.
78
 
79
  Rules:
80
+ - Max 4-5 words per line
81
  - Natural line breaks
82
  """
83
  words = text.split()