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.
Sometimes city label and note's background and text do not strictliy align, when the overmap font and normal font has different sizes or when overmap window size is not dividable by the tile size.
This fixes it by:
ch
parameter ofOutputChar
is assumed byFont
classes to be a single utf-8 encoded unicode codepoint. Passing a string toOutputChar
incidentally works, but the drawing position need to be hacked to correctly position the string, andOutputChar
may render text incorrectly if characters after the first one needs to be drawn with a fallback font. There are also some android-specific code that needs to be updated to usedraw_string
, but I don't have the environment to test it, so I'll leave it for @ZhilkinSerg.utf8_width
to get the correct print length of strings.font
instead ofovermap_font
, because the code usesfontwidth
andfontheight
which arefont
's properties.