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

data/ directory is 41mb #666

Open
joereynolds opened this issue Jan 9, 2025 · 2 comments
Open

data/ directory is 41mb #666

joereynolds opened this issue Jan 9, 2025 · 2 comments

Comments

@joereynolds
Copy link
Contributor

joereynolds commented Jan 9, 2025

Hello!

I'm doing some spring cleaning on my game and in doing so, I've managed to shrink most of the size.
However, I've noticed a large part of the filesize is actually from fonts in this repo.
I thought removing them in the pipeline might work but alas no. It tries to load the fonts regardless of whether they are used or not

Is there anything that can be done to get around this?

I tried removing them and I've also tried truncating them to 0 bytes but it still throws up errors

@robclewley
Copy link
Contributor

Agreed that I've had to hack around this by modifying the library for my game packaging. Some kind of switch to avoid attempting to find and load default fonts would be a nice to have when the user has made sure they've provided all the fonts that are needed themselves, so that the included TTFs could be deleted before packaging. I'll review my hacks but I'm not sure they'd be helpful in making a worthy suggested change.

@joereynolds
Copy link
Contributor Author

Yeah. Also if the goal with these fonts is to make sure we have all glyphs, there's a much lighter alternative.
There's the GNU Unifont which is roughly 5mb and is what I use to accommodate Chinese/Russian etc...
https://unifoundry.com/unifont/index.html

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

2 participants