-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix for various font issues #118
Conversation
pyfiglet/__init__.py
Outdated
@@ -336,10 +340,11 @@ def __char(data): | |||
# Load German Umlaute - the follow directly after standard character 127 | |||
if data: |
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.
Maybe drop this if
then?
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.
Oops. That was an attempt to fix gradient, which is actually a broken file... Some definitions are missing lines and so pyfiglet runs out of data on the last character. I originally thought it was missing the enter definition, but it dies part-way through in __char()
.
The real question should probably be whether pyfiglet should soldier on, or reject the font entirely.
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.
My assumption, when I added that, was that fonts would either have all these german umlaut extensions or not. Just a wild guess, I don't know how the fonts are usually structured.
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.
Yeah - that's what figlet does too, but it's clearly happy to stop processing mid character and just use what it found.
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.
What's the conclusion here. Ready to go or is something outstanding here? I don't have a strong opinion, though possibly it's better to follow figlet's behaviour?
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.
I'll keep it simple and just remove the erroneous check.
Signed-off-by: Peter Waller <p@pwaller.net>
(I hope you don't mind, I'm attempting to enable the actions so we can see the tests pass. Not quite sure why they aren't running already. Are you happy for me to merge assuming that they do?) |
There we go. Tests are running now. |
This change should:
TBH, I think pyfiglet does the right thing and so we shouldn't force the dodgy line splitting in toilet.
Basically addresses most of the issues in #116.