Skip to content

Fonts FtLibraryHandler and FontHandler refactoring #2413

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

saurtron
Copy link
Collaborator

@saurtron saurtron commented Jun 26, 2025

Work done

  • Separate FtLibraryHandler into its own file.
  • Move some global font config options to fontHandler.
  • Centralize font Init/Kill at fontHandler.

Remarks

  • At the moment font global/static code is haphazardly split among CFontTexture, glFont, SpringApp..., with the recently introduced fontHandler I'm moving some more of that logic there.
  • Also split FtLibraryHandler into a separate file, since it feels out of place inside CFontTexture.
    • Extended FtLibraryHandlerProxy api to ensure ft and fc includes don't leak out of cpp files and to have a bit better decoupling.

Next steps

  • Some more candidate code to moving out is all the default fonts code at glFont.
    • Will move that in a later PR, so as to limit scope of this one.
    • Probably directly under fontHandler too, but could also create a new module for those.
  • There's still more work to do re: refactoring fonts, consider this a start and everyone is welcome here to voice any remarks or ideas for the future or whatever.

@saurtron saurtron added refactor Internal code cleanup; paying off technical debt; janitorial work. area: fonts labels Jun 26, 2025
@saurtron saurtron changed the title Fonts FtLibraryHandler and FtHandler refactoring Fonts FtLibraryHandler and FontHandler refactoring Jun 26, 2025
@lhog
Copy link
Collaborator

lhog commented Jul 19, 2025

Let's comment out FcFini(); as per #2450

@saurtron
Copy link
Collaborator Author

Let's comment out FcFini(); as per #2450

Made a separate PR for that so its easier to merge into the release branch if needed: #2494

Will rebase into this one once that's in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: fonts refactor Internal code cleanup; paying off technical debt; janitorial work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants