Show unicode box drawing characters with bitmap fonts #36536
Merged
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
SUMMARY: Bugfixes "Fix roads not drawn in the overmap when using bitmap font without SDL line drawing"
Purpose of change
The symbols for overmap road tiles are unicode box drawing characters, so if SDL line drawing is disabled, and bitmap font is used (such as when using the Graphical Overmap mod), roads will not be correctly drawn.
Describe the solution
Check if the character being drawn is a unicode box drawing character in
BitmapFont::OutputChar
, and useBitmapFont::draw_ascii_lines
in such case.Describe alternatives you've considered
I considered converting the bitmap font of Graphical Overmap to a ttf font, but that would probably be harder to maintain if someone wants to add more characters to the font in the future.
Testing
Roads in the overmap are now correctly drawn with this change.