// Attempt to get a native TTF font. If not, use the default bitmap font.
global SYSTEM_FONT
if SYSTEM_FONT:
label_font = SYSTEM_FONT.font_variant(size=round(16 * scale))
prob_font = SYSTEM_FONT.font_variant(size=round(12 * scale))
else:
label_font = ImageFont.load_default()
After Change
// Attempt to get a native TTF font. If not, use the default bitmap font.
global SYSTEM_FONT
if SYSTEM_FONT:
label_font = SYSTEM_FONT.font_variant(size=int(round(16 * scale)))
prob_font = SYSTEM_FONT.font_variant(size=int(round(12 * scale)))
else:
label_font = ImageFont.load_default()