You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like on some Windows machines (specifically, NOAA), font folder's contents cannot be found, and TagLab.py cannot open properly. The issue has to do with finding the path to the folders? But, it works on most Window machines, so it's probably some default configuration on some machines with regards to paths. Below is the original code; although PATH_FONTS can be found by os.path.exists, the fond_idx is not coming back as a valid number <1, causing the script to not run.
Temporary fix is removing the if statements and just use Roboto by default.
# set the application fontifplatform.system() !="Darwin":
QFD=QFontDatabase()
font_id1=QFD.addApplicationFont(os.path.join(PATH_FONTS, "opensans/OpenSans-Regular.ttf"))
iffont_id1==-1:
print("Failed to load application font..")
sys.exit(-2)
font_id2=QFD.addApplicationFont(os.path.join(PATH_FONTS, "roboto/Roboto-Light.ttf"))
iffont_id2==-1:
print("Failed to load application font..")
sys.exit(-2)
font_id3=QFD.addApplicationFont(os.path.join(PATH_FONTS, "roboto/Roboto-Regular.ttf"))
iffont_id3==-1:
print("Failed to load application font..")
sys.exit(-2)
font=QFont('Roboto')
app.setFont(font)
The text was updated successfully, but these errors were encountered:
For posterity:
It seems like on some Windows machines (specifically, NOAA),
font
folder's contents cannot be found, andTagLab.py
cannot open properly. The issue has to do with finding the path to the folders? But, it works on most Window machines, so it's probably some default configuration on some machines with regards to paths. Below is the original code; althoughPATH_FONTS
can be found byos.path.exists
, the fond_idx is not coming back as a valid number <1, causing the script to not run.Temporary fix is removing the if statements and just use
Roboto
by default.The text was updated successfully, but these errors were encountered: