mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
changed while loop to scale ChuckBuilds Sign
This commit is contained in:
@@ -41,7 +41,9 @@ def main():
|
|||||||
text = " Chuck Builds"
|
text = " Chuck Builds"
|
||||||
|
|
||||||
# Find the largest font size that fits
|
# Find the largest font size that fits
|
||||||
max_font_size = 100 # Set a reasonable maximum font size
|
min_font_size = 6
|
||||||
|
max_font_size = 36
|
||||||
|
font_size = min_font_size
|
||||||
while font_size <= max_font_size:
|
while font_size <= max_font_size:
|
||||||
bbox = draw.textbbox((0, 0), text, font=font)
|
bbox = draw.textbbox((0, 0), text, font=font)
|
||||||
text_width = bbox[2] - bbox[0]
|
text_width = bbox[2] - bbox[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user