pygame.font.match_font should match fonts from path

Issue #330 new
Silas Gyger
created an issue

I thought that it would be very useful if pygame.font.match_font would match fonts from a path as well. This code:

font = "Fonts/bar.ttf"
pygame.font.Font(pygame.font.match_font(font), 12)

should load the font "Fonts/bar.ttf".

The person that defines font wouldn't have to think about where the font is located exactly. I would suggest that match_font first checks if the font is available in the file system, and then if it's available as a system font. Maybe even add an optional argument installed_only that makes match_font skip local font-files if set true.

Comments (0)

  1. Log in to comment