[5.0.0-rc3] Assertion error at switching units while measuring distances (lp:#1781595)

[Original report](https://bugs.launchpad.net/bugs/1781595) created by **Frank (zyklon87)**
```
Click the measurement icon and click once into the board to draw a
measurement line in PCBnew. While having the measurement scale hanging on
the mouse cursor, press Ctrl+U for switching units.


You will then get a series of assertion errors, of which I copied the first
few here:



ASSERT INFO:
/builddir/build/BUILD/kicad-r13223-3df27430/common/gal/opengl/opengl_gal.cpp(1710):
assert "c == ' ' || glyph" failed in computeBitmapTextSize().

BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[2] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxEvtHandler::ProcessPendingEvents()
[7] wxAppConsoleBase::ProcessPendingEvents()
[8] wxApp::DoIdle()
[9] g_main_context_dispatch
[10] g_main_loop_run
[11] gtk_main
[12] wxGUIEventLoop::DoRun()
[13] wxEventLoopBase::Run()
[14] wxAppConsoleBase::MainLoop()
[15] wxEntry(int&, wchar_t**)
[16] __libc_start_main
[17] _start




ASSERT INFO:
/builddir/build/BUILD/kicad-r13223-3df27430/common/gal/opengl/opengl_gal.cpp(1617):
assert "glyph" failed in drawBitmapChar().

BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[2] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxEvtHandler::ProcessPendingEvents()
[7] wxAppConsoleBase::ProcessPendingEvents()
[8] wxApp::DoIdle()
[9] g_main_context_dispatch
[10] g_main_loop_run
[11] gtk_main
[12] wxGUIEventLoop::DoRun()
[13] wxEventLoopBase::Run()
[14] wxAppConsoleBase::MainLoop()
[15] wxEntry(int&, wchar_t**)
[16] __libc_start_main
[17] _start




ASSERT INFO:
/builddir/build/BUILD/kicad-r13223-3df27430/common/gal/opengl/opengl_gal.cpp(1710):
assert "c == ' ' || glyph" failed in computeBitmapTextSize().

BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[2] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxEvtHandler::ProcessPendingEvents()
[7] wxAppConsoleBase::ProcessPendingEvents()
[8] wxApp::DoIdle()
[9] g_main_context_dispatch
[10] g_main_loop_run
[11] gtk_main
[12] wxGUIEventLoop::DoRun()
[13] wxEventLoopBase::Run()
[14] wxAppConsoleBase::MainLoop()
[15] wxEntry(int&, wchar_t**)
[16] __libc_start_main
[17] _start



ASSERT INFO:
/builddir/build/BUILD/kicad-r13223-3df27430/common/gal/opengl/opengl_gal.cpp(1617):
assert "glyph" failed in drawBitmapChar().

BACKTRACE:
[1] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[2] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[3] wxEvtHandler::TryHereOnly(wxEvent&)
[4] wxEvtHandler::ProcessEventLocally(wxEvent&)
[5] wxEvtHandler::ProcessEvent(wxEvent&)
[6] wxEvtHandler::ProcessPendingEvents()
[7] wxAppConsoleBase::ProcessPendingEvents()
[8] wxApp::DoIdle()
[9] g_main_context_dispatch
[10] g_main_loop_run
[11] gtk_main
[12] wxGUIEventLoop::DoRun()
[13] wxEventLoopBase::Run()
[14] wxAppConsoleBase::MainLoop()
[15] wxEntry(int&, wchar_t**)
[16] __libc_start_main
[17] _start
```
Original tags: pcbnew

Story points: 6.0