When I add a true type font to my repl through ImageFont in PIL, it doesn’t recognise it as a font. The program works perfectly on my computer, but the second I upload it to Repl, it stops working. I have tried loading the files in from the local directory and loading them in from the github source repo, both of which give the same error, which leads me to believe it is a problem with the decoding of the .ttf file itself. The error message is as follows:
File "main.py", line 127, in create_image
font = ImageFont.truetype(io.BytesIO(reg.content), 115)
File "/home/runner/balls/venv/lib/python3.8/site-packages/PIL/ImageFont.py", line 959, in truetype
return freetype(font)
File "/home/runner/balls/venv/lib/python3.8/site-packages/PIL/ImageFont.py", line 956, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/home/runner/balls/venv/lib/python3.8/site-packages/PIL/ImageFont.py", line 251, in __init__
load_from_bytes(font)
File "/home/runner/balls/venv/lib/python3.8/site-packages/PIL/ImageFont.py", line 232, in load_from_bytes
self.font = core.getfont(
OSError: unknown file format