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

How to edit FONT #48

Closed
justtango opened this issue May 28, 2021 · 2 comments
Closed

How to edit FONT #48

justtango opened this issue May 28, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@justtango
Copy link

justtango commented May 28, 2021

I want to edit FONT, export, modify and reimport. But it do not work when I save() it:
Code

env = UnityPy.load(file_path)
    for obj in env.objects:
        if obj.type == 'Font':
           font.m_FontData = open(font_file_path, 'rb').read()
           font.save()
    with open(another_file_path, 'wb') as f:
        f.write(env.file.save())

Error
The Font do not change. How can I edit a Font file pls?

  • following data:
    • Python version: 3.6.0
    • UnityPy version: 1.7.6
@justtango justtango added the bug Something isn't working label May 28, 2021
@K0lb3
Copy link
Owner

K0lb3 commented May 31, 2021

A lot of game use glyphs instead of normal fonts,
in such cases, it's not possible to edit the font data that way.

Exporting, to say nothing about editing, glyph based fonts isn't supported atm yet either,
because it's very difficult to convert them into a normal font, due to the way fonts work.

@justtango
Copy link
Author

I see. Thanks for reply!

@K0lb3 K0lb3 closed this as completed Jun 8, 2021
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