Skip to content

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