@@ -437,12 +437,13 @@ def SysFont(name, size, bold=False, italic=False, constructor=None):
437
437
fall back on the builtin pygame font if the given font
438
438
is not found.
439
439
440
- Name can also be an iterable of font names, a string of
441
- comma-separated font names, or a bytes of comma-separated
442
- font names, in which case the set of names will be searched
443
- in order. Pygame uses a small set of common font aliases. If the
444
- specific font you ask for is not available, a reasonable
445
- alternative may be used.
440
+ Name shall be supplied as the plain font name without
441
+ file extensions. Name can also be an iterable of font names,
442
+ a string of comma-separated font names, or a bytes of
443
+ comma-separated font names, in which case the set of names
444
+ will be searched in order. Pygame uses a small set of common
445
+ font aliases. If the specific font you ask for is not available,
446
+ a reasonable alternative may be used.
446
447
447
448
If optional constructor is provided, it must be a function with
448
449
signature constructor(fontpath, size, bold, italic) which returns
@@ -469,12 +470,16 @@ def SysFont(name, size, bold=False, italic=False, constructor=None):
469
470
break
470
471
471
472
else :
473
+ font_verification_message = (
474
+ "Verify your font name input. Using the default font instead."
475
+ )
476
+
472
477
if len (name ) > 1 :
473
478
names = "', '" .join (name )
474
479
warnings .warn (
475
480
"None of the specified system fonts "
476
481
f"('{ names } ') could be found. "
477
- "Using the default font instead. "
482
+ f" { font_verification_message } "
478
483
)
479
484
else :
480
485
# Identifies the closest matches to the font provided by
@@ -490,7 +495,7 @@ def SysFont(name, size, bold=False, italic=False, constructor=None):
490
495
warnings .warn (
491
496
f"The system font '{ name [0 ]} ' couldn't be "
492
497
f"found. { match_text } "
493
- "Using the default font instead. "
498
+ f" { font_verification_message } "
494
499
)
495
500
else :
496
501
fontname = None
0 commit comments