Use additionnal font
Almtesh opened this issue · 4 comments
Almtesh commented
Hi,
I want to use a additionnal font that is not in the fonts directory.
I use this as a Python3 library. I used the font param from Figlet class, but it does not work with path and openned file.
pwaller commented
Please provide complete instructions and materials for reproducing.
Almtesh commented
Debian 8.7 package python3-pyfiglet 0.7.2+dfsg-1
>>> from pyfiglet import Figlet
>>> f = Figlet (font = '/home/almtesh/doom.flf')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/pyfiglet/__init__.py", line 527, in __init__
self.setFont()
File "/usr/lib/python3/dist-packages/pyfiglet/__init__.py", line 534, in setFont
self.Font = FigletFont(font=self.font)
File "/usr/lib/python3/dist-packages/pyfiglet/__init__.py", line 85, in __init__
self.data = self.preloadFont(font)
File "/usr/lib/python3/dist-packages/pyfiglet/__init__.py", line 100, in preloadFont
raise FontNotFound(font)
pyfiglet.FontNotFound: /home/almtesh/doom.flf
I don't understand how to use the /home/almtesh/doom.flf
font.
Almtesh commented
Thanks a lot. I'll try this when I'll have some time to do.