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

Can't decompress font with 'KerningValues_size' > 0 #40

Closed
jesliwang opened this issue Mar 27, 2021 · 3 comments
Closed

Can't decompress font with 'KerningValues_size' > 0 #40

jesliwang opened this issue Mar 27, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@jesliwang
Copy link
Contributor

Code
Font.py:24
for i in range(KerningValues_size):
reader.Position += 8

Error
FontData_size -1082130432 FLARESERIF-821-BT
FontData_size 85688 SukhumvitSet-Text
FontData_size -1082130432 FLARESERIF-821-BOLD-BT
FontData_size -1082130432 Arial

get wrong FontData_size

Bug
I TEST AND TRY. When it changes to 'reader.Position += 8' To 'reader.read_int() reader.read_int() ', EVERYTHING WILL BE OK!!!!

To Reproduce

  1. Get "State of Survival Survive the Zombie Apocalypse_v1.10.10_apkpure.com" from internet
@jesliwang jesliwang added the bug Something isn't working label Mar 27, 2021
@K0lb3
Copy link
Owner

K0lb3 commented Mar 28, 2021

Thanks for the report.

The position handling still has some issues atm and I will try to fix the underlying problem to solve this kind of problem for good.

@K0lb3
Copy link
Owner

K0lb3 commented Mar 28, 2021

1.6.7.2 - ObjectReader.Position fix should fix the issue.
I also streamlined the Font class a bit so that it uses the original C# naming style and added the general export code to the readme.

@K0lb3 K0lb3 closed this as completed Mar 31, 2021
@jesliwang
Copy link
Contributor Author

Sorry for my late reply!! It works well, GREAT WORK!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants