Update default.py to adjust level text positioning, moving it to start after the profile picture for better alignment and readability in profile card rendering.
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
This commit is contained in:
parent
c840311f42
commit
1c55a00e60
1 changed files with 2 additions and 2 deletions
|
@ -264,12 +264,12 @@ def generate_default_profile(
|
||||||
# Draw percentage
|
# Draw percentage
|
||||||
draw.text((percent_x, percent_y), percent_text, font=percent_font, fill=(255, 255, 255))
|
draw.text((percent_x, percent_y), percent_text, font=percent_font, fill=(255, 255, 255))
|
||||||
|
|
||||||
# Level text - back at the left edge
|
# Level text - starts after profile picture
|
||||||
level_font = ImageFont.truetype(str(font_path or imgtools.DEFAULT_FONT), 48)
|
level_font = ImageFont.truetype(str(font_path or imgtools.DEFAULT_FONT), 48)
|
||||||
level_text = f"LEVEL {level}"
|
level_text = f"LEVEL {level}"
|
||||||
if prestige > 0:
|
if prestige > 0:
|
||||||
level_text = f"P{prestige} • {level_text}"
|
level_text = f"P{prestige} • {level_text}"
|
||||||
draw.text((15, 15), level_text, font=level_font, fill=user_color or (255, 255, 255))
|
draw.text((left_edge, 15), level_text, font=level_font, fill=user_color or (255, 255, 255))
|
||||||
|
|
||||||
# Composite the layers
|
# Composite the layers
|
||||||
if not render_gif or (not pfp_animated and not bg_animated):
|
if not render_gif or (not pfp_animated and not bg_animated):
|
||||||
|
|
Loading…
Add table
Reference in a new issue