mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
Enforce that numbers are all the same exact width when loading fonts.
This commit is contained in:
parent
470f843262
commit
1f1672d6cc
@ -600,6 +600,18 @@ static int render_font_load_bdf(render_font *font)
|
||||
mame_printf_warning("Loading BDF font... (%d characters loaded)\n", charcount);
|
||||
}
|
||||
}
|
||||
|
||||
/* make sure all the numbers are the same width */
|
||||
if (font->chars[0] != NULL)
|
||||
{
|
||||
int maxwidth = 0;
|
||||
for (int ch = '0'; ch <= '9'; ch++)
|
||||
if (font->chars[0][ch].bmwidth > maxwidth)
|
||||
maxwidth = font->chars[0][ch].width;
|
||||
for (int ch = '0'; ch <= '9'; ch++)
|
||||
font->chars[0][ch].width = maxwidth;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user