Add scaling for vfnts and scale multipler to gr_string() #6481
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.
Adds two features for string handling:
First it adds scaling ability to Volition fonts which brings them into parity with TTF fonts. In doing so it made sense to move the font scale option out of the TTF font cpp file and into the general font cpp file. Notably, allowing players to scale fonts is currently opt-in. Now that all font types can scale, there's possibly an argument to make them opt-out. I could go either way, personally.
Second it adds a scale multiplier to gr_string(). This will be used for the HUD Config upgrade and it basically allows a gr_string() call to multiply the user's font scale up or down by a percentage. Think of it like a C++ version of CSS's
em
font size capability. This did change the signature of gr_string() because I feltscaleMultiplier
had more utility than thelength
parameter and there were only a handful of places wherelength
was used so it was fairly trivial to update them.