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

GRAPHICS: Use custom stream callbacks for loading TTF fonts #5456

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccawley2011
Copy link
Member

This reduces memory usage when loading larger fonts - the ZipArchive class already loads the entire file into memory, so requiring a second block of memory for use with FreeType is an issue when dealing with CJK files which can go up to 8 MB.

engines/tetraedge/te/te_font3.cpp Outdated Show resolved Hide resolved
_font = _deletableFont;
BaseFileManager::getEngineInstance()->closeFile(file);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't correct either.

@sev-
Copy link
Member

sev- commented May 3, 2024

@ccawley2011, any updates? Also, the patch got bitrot badly now.

@ccawley2011
Copy link
Member Author

@ccawley2011, any updates? Also, the patch got bitrot badly now.

The PR is rebased now, but there's still a potential issue with the Wintermute engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants