Initial commit of Roster

This commit is contained in:
Media
2025-06-28 01:12:46 -05:00
commit c23d3a7676
4367 changed files with 890519 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
from PIL import ImageFont
def get_text_width(text, font_path, font_size):
font = ImageFont.truetype(font_path, font_size)
bbox = font.getbbox(text) # (left, top, right, bottom)
width = bbox[2] - bbox[0]
return width