Tweak font sizes
This commit is contained in:
parent
987d16a617
commit
bb7f45ffbd
1 changed files with 8 additions and 7 deletions
15
main.py
15
main.py
|
@ -3,13 +3,13 @@ import requests
|
|||
from resizeimage import resizeimage
|
||||
|
||||
OUTPUT_RESOLUTION = (1280, 720)
|
||||
TITLE_FONT = ImageFont.truetype("Roboto-Regular.ttf", 92)
|
||||
TAGS_FONT = ImageFont.truetype("RobotoMono-Regular.ttf", 40)
|
||||
FOOTER_FONT = ImageFont.truetype("RobotoMono-Regular.ttf", 25)
|
||||
TITLE_FONT = ImageFont.truetype("Roboto-Regular.ttf", 90)
|
||||
TAGS_FONT = ImageFont.truetype("RobotoMono-Regular.ttf", 35)
|
||||
FOOTER_FONT = ImageFont.truetype("RobotoMono-Regular.ttf", 30)
|
||||
TITLE_PADDING = 75
|
||||
|
||||
TITLE = "Accessing Tailscale whilst using Mullvad"
|
||||
TAGS = "#linux #containers #foobar"
|
||||
TAGS = "#linux"
|
||||
|
||||
|
||||
def get_text_width(text, font):
|
||||
|
@ -85,11 +85,12 @@ draw.text(
|
|||
|
||||
print("Drawing footer")
|
||||
draw.rectangle(
|
||||
[(0, OUTPUT_RESOLUTION[1] - 50), OUTPUT_RESOLUTION], fill=(0, 0, 0, int(255 * 0.5))
|
||||
[(0, OUTPUT_RESOLUTION[1] - (FOOTER_FONT.size * 2)), OUTPUT_RESOLUTION],
|
||||
fill=(0, 0, 0, int(255 * 0.66)),
|
||||
)
|
||||
|
||||
draw.text(
|
||||
(25, OUTPUT_RESOLUTION[1] - 25),
|
||||
(25, OUTPUT_RESOLUTION[1] - FOOTER_FONT.size),
|
||||
text="theorangeone.net",
|
||||
font=FOOTER_FONT,
|
||||
fill="#e85537",
|
||||
|
@ -99,7 +100,7 @@ draw.text(
|
|||
|
||||
|
||||
draw.text(
|
||||
(OUTPUT_RESOLUTION[0] - 25, OUTPUT_RESOLUTION[1] - 25),
|
||||
(OUTPUT_RESOLUTION[0] - 25, OUTPUT_RESOLUTION[1] - FOOTER_FONT.size),
|
||||
text="2024-01-01",
|
||||
font=FOOTER_FONT,
|
||||
fill="white",
|
||||
|
|
Loading…
Reference in a new issue