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

seek to the start of the file after checking for a zip header #115

Merged
merged 4 commits into from
Aug 18, 2023

Conversation

stefanor
Copy link
Collaborator

@stefanor stefanor commented Aug 11, 2023

Fixes font listing for non-zipped fonts.

pyfiglet -l was returning an empty list in my testing.

This shows up 3 regressions:

  1. All the ZIP fonts fail testing. We can't actually parse them. Did they ever work? (Add support for zipped fonts #64)
  2. We broke some font-parsing when adding umlaut support (Add loading German Umlaute #96).
  3. We added fonts that don't pass their test suites. (Some the same parsing error as the zip fonts, others just test failures)

All zip fonts and some non-zip fonts fail to parse with this error:

e.g. for `ascii12`:

```
Traceback (most recent call last):
  File "pyfiglet/__init__.py", line 349, in loadFont
    width, letter = __char(data)
                    ^^^^^^^^^^^^
  File "pyfiglet/__init__.py", line 316, in __char
    end = self.reEndMarker.search(line).group(1)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
```
@pwaller
Copy link
Owner

pwaller commented Aug 18, 2023

I've taken the liberty of rebase & force push after #114 to see the tests pass in CI.

@pwaller
Copy link
Owner

pwaller commented Aug 18, 2023

Tests passed in CI. Nicely done, thanks again.

@pwaller pwaller merged commit 2f2494d into master Aug 18, 2023
@pwaller pwaller deleted the get-nonzip-fonts branch August 18, 2023 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants