-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 100+ fonts from jave.de Figlet Fonts collection v4.0 #46
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,10 +33,13 @@ def __init__(self, opts): | |
self.fail = 0 | ||
self.failed = [] | ||
self.oked = [] | ||
self.skip = ['runic','pyramid','eftifont'] # known bug.. | ||
# known bugs.. | ||
self.skip = ['runic', 'pyramid', 'eftifont', 'DANC4', 'dietcola'] | ||
# Toilet fonts that we don't handle identically, yet | ||
self.skip += ['emboss', 'emboss2', 'future', 'letter', 'pagga', | ||
'smblock', 'smbraille', 'wideterm'] | ||
# fonts that throw Unicode decoding errors | ||
self.skip += ['dosrebel', 'konto', 'kontoslant'] | ||
self.f = Figlet() | ||
|
||
def outputUsingFigletorToilet(self, text, font, fontpath): | ||
|
@@ -48,7 +51,13 @@ def outputUsingFigletorToilet(self, text, font, fontpath): | |
raise Exception('Missing font file: '+fontpath) | ||
|
||
p = Popen(cmd, bufsize=4096, stdout=PIPE) | ||
outputFiglet = p.communicate()[0].decode('utf8') | ||
try: | ||
outputFiglet = p.communicate()[0].decode('utf8') | ||
except UnicodeDecodeError as e: | ||
print("Unicode Error handling font {}".format(font)) | ||
outputFiglet = '' | ||
except e: | ||
raise e | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably. It if was anything other than a UnicodeDecodeError, I didn't want it to go by un-noticed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed in 7e9c832 |
||
return outputFiglet | ||
|
||
def validate_font_output(self, font, outputFiglet, outputPyfiglet): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line has extra whitespace at the end, please remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7e9c832