I'm having a tough time trying to get something working which I think should be straightforward.
I'm new to python and learning via projects which in this case is a simple PDF generator. I want to add custom fonts to my program (Poppins) and I can get it to work if I include the fonts in the exact location as main.py, but ideally, I want these stored in a separate folder.
I've tried numerous suggestions but nothing has worked for me yet. Such as:
- appending/inserting the font filepath to sys.path (link)
- creating an
__init__.py
file in the main directory with the following
import sys
sys.path.insert(1, '.')
- Also tried a blank
__init__.py
file in the font directory
I've attached a screenshot of my code below along with the error message. Thanks in advance for any support.