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

doesn't work? #16

Open
Soft-Bred opened this issue Apr 25, 2022 · 8 comments
Open

doesn't work? #16

Soft-Bred opened this issue Apr 25, 2022 · 8 comments

Comments

@Soft-Bred
Copy link

I tried to run the command, but I get this error, idk what the problem could be...

bred@BredBook woff2otf-master % python3 woff2otf.py Beausite-Classic_BoldItalic.woff Beausite-Classic_BoldItalic.ttf
Traceback (most recent call last):
  File "/Users/bred/Desktop/woff2otf-master/woff2otf.py", line 110, in <module>
    sys.exit(main(sys.argv))
  File "/Users/bred/Desktop/woff2otf-master/woff2otf.py", line 105, in main
    convert(source_file_name, target_file_name)
  File "/Users/bred/Desktop/woff2otf-master/woff2otf.py", line 89, in convert
    convert_streams(infile, outfile)
  File "/Users/bred/Desktop/woff2otf-master/woff2otf.py", line 43, in convert_streams
    outfile.write(struct.pack(">H", searchRange));
struct.error: 'H' format requires 0 <= number <= 65535
@hanikesn
Copy link
Owner

hanikesn commented Apr 26, 2022

Are you sure the file is not in WOFF2 format?

@Soft-Bred
Copy link
Author

nope, they were in WOFF, I can give some to you if you'd like to try.
Font.zip

@blakeperdue
Copy link

blakeperdue commented Jan 22, 2024

Looks like there might be an issue running this on more recent Python versions? I am getting the same errors as @Soft-Bred. @hanikesn any ideas? Thanks for any help!!

@blakeperdue
Copy link

Yea, tracing the code it looks like offset is getting set high (offset=6477797044) which causes line 63 to error:

outfile.write(struct.pack(">I", offset))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: 'I' format requires 0 <= number <= 4294967295

@hanikesn
Copy link
Owner

@blakeperdue Can you please upload/link a woff file that's causing the issue.

@Gabrieloxe
Copy link

I am experiencing the same issue on python 3.10.4

@bertrandperrier
Copy link

i have the same problem

struct.error: 'I' format requires 0 <= number <= 4294967295

url

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

No branches or pull requests

6 participants