Closed jrg94 closed 4 years ago
So, I'm toying with this right now:
len(font_manager.fontManager.ttflist)
376
FONTS = {
... f"{f.name} ({f.weight})": f.fname
... for f in font_manager.fontManager.ttflist
... }
len(FONTS)
280
Looks like I may have to list all variables.
Even when listing all types, I wasn't able to get the total number. I'm wondering if their are duplicates:
FONTS = {
... f"{f.name} ({f.weight}, {f.style}, {f.stretch}, {f.size}, {f.variant})": f.fname
... for f in font_manager.fontManager.ttflist
... }
len(FONTS)
365
len(font_manager.fontManager.ttflist)
376
Ended up fixing this late last night, but I think I’ll need to make additional drop down settings for the various variables available. I’m not sure how this will work yet of course.
I just realized that the following expression actually removes multiple versions of a font from the same family:
Also, the way this generates fonts, it makes it difficult to map them back when using the CLI. Perhaps that issue will be solved if I can find a way to get all fonts listed.