This selects DejaVu Sans Mono instead of whatever sans serif font is the
default for the current locale is. I'm not entirely sure what to do to
handle non-Western European languages since this is intended to be used
for displaying code or debug info anyway.
Because I can't be bothered to figure out how the codepoint fallback
works for GUI1, I'm only adding support for using this with the
Pango/Cairo ttext wrapper, which is used by GUI2. I'm also leaving it up
to fontconfig to find the correct font file for the font when selected.
Hopefully this will suffice for now.
draw() calls draw_init(), which in turn calls draw_all_panels(), which
destroys all theme UI buttons, meaning the icon overlays set on them by
set_button_state() are lost until that function is mysteriously called
at a later time, either when control is transferred to the player after
completing the start event, or the player presses the left mouse button
on the minimap buttons (??????) or some other unspecified UI event takes
place either automatically or through player interaction.
This is really a patch over 8e3cfc8a2b30c4e0ea36308aa7dcb6480bc15d76,
where I failed to make sure one of the affected add-on scenarios would
no longer reproduce the bug before pushing.
To do that i replaced the underlying_id integer with a struct that
holds an integer and has functions to know whether this is fake id or
not.
Fake unit ids can be created via whiteboard or during unsyced contexes
(like wesnoth.sync_choice or ai code)
This commit is intended to fix the case that soneone created a temporary
unit in wesnoth.sync_choice and then returns that units id which might
not be unique (becasue it is based on a fake id).
This commit also removes a comment that is invalid by now because config
can hold unsigned long long.