[Modding] Font and Translation System#6643
Draft
Jepvid wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a bigger pr than what I am used to and will also admit that this have been AI assisted. That said I have done my best to sanity check everything and tested alot of edge cases.
This will implement a system to allow fonts to be used with SoH. Both .otf and .ttf files are supported.
It works by disabling text draw and use imgui to draw the font on top of the textbox. If no translation file is used then it will read and display the normal ingame messages
When a translation file is in use customfont.cpp takes over and inserts the new text rather than reading what the game is trying to display.
i have made a page explaning more for mod makers over at https://the-harbour-ashen.vercel.app/docs/ship-of-harkinian/mod-tutorials/custom-font
This only works on whats displayed in text boxes. File select screen and texture applied text are handled elsewhere.
Build Artifacts