Better wxASSERT message in OPENGL_GAL::computeBitmapTextSize, if the char is not found in font.

This commit is contained in:
jean-pierre charras 2018-07-17 17:57:19 +02:00
parent afd80c3cdb
commit 82d492a840
1 changed files with 3 additions and 1 deletions

View File

@ -1707,8 +1707,10 @@ std::pair<VECTOR2D, float> OPENGL_GAL::computeBitmapTextSize( const UTF8& aText
unsigned int c = *chIt;
const FONT_GLYPH_TYPE* glyph = LookupGlyph( c );
// Debug: show not coded char in the atlas
wxASSERT_MSG( glyph, wxString::Format( "missing char in font: code 0x%x <%c>", c, c ) );
if( !glyph || // Not coded in font
if( !glyph || // Not coded in font
c == '-' || c == '_' ) // Strange size of these 2 chars
{
glyph = defaultGlyph;