Fix config/font.json generation to append correct paths for Android #72923
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Bugfixes "Android: Added correct path for default Terminus font"
Purpose of change
Fixes #72922
This is a really old Android bug, as was noted in https://www.reddit.com/r/cataclysmdda/comments/ppwq9f/cataclysm_dda_on_android_an_indepth_tweaking_guide/, nearly 3 years ago. This will let Android users see/use the bundled Terminus font by default, without having to jump through hoops replacing or editing files manually. Showing Terminus as the default makes a world of difference in how nice the game appears compared to unifont (see screenshots in attached issue and reddit post).
Describe the solution
Copied the function that adds the correct path to unifont (which works properly), adjusted for Terminus.
Describe alternatives you've considered
This solution would force terminus to be added even if it was removed (to back of the list, but in front of unifont). Perhaps a more elegant solution would be to craft a function that just validates and fixes an invalid path for any entry in the list only if the entry exists to begin with, while leaving the ensure_unifont_loaded function be the one that specifically adds unifont to the back if it doesn't exist.
(I don't know how to do this off the top of my head but pretty confident I could figure it out. Eventually.)
Testing
None.I have no idea how to compile for Android. Help please and thanks.Edit: compiled and tested on Windows, nothing looks out of the ordinary, the functions don't appear to change anything, as expected.
fonds.json result:
Additional context
Review appreciated, I have no c++ background and also don't know if this is the proper way to solve the issue. And as mentioned above not sure how to compile to test...