Skip to content
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

Merged
merged 4 commits into from
Apr 12, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pyfiglet/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7e9c832

# 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):
Expand All @@ -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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This except e: raise e looks superfluous?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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):
Expand Down