Is it possible to change fonts on pygame?
I've been attempting to successfully change the font for my game in pygame, but it seems that it's not working.
I'm comepletely open to the idea that I'm just not doing it right, so please feel free to give me some pointers regarding how to change fonts successfully.
@ETHANSIAO Quick follow up: I just now copy-pasted that code on the page you shared with me and ran it on a repl, and sure enough it isn't working. Does this confirm that changing fonts in repl.it isn't possible, or is there something I have to do to make this work? Maybe you could share a repl successfully doing so?
As you can see, the program clearly isn't giving the output intended. What's going on?
@ArchieMaclean that's not the correct font that it was supposed to display.
Try using the comic sans program, and you'll see it doesn't display comic sans either. The following is an image of what the result is supposed to be:
This file cannot be displayed: https://storage.googleapis.com/replit/images/1554490465056_de1c8ebb56611be7fe93c957cf5faa81.pn
This repl that exact same code, but it's still the same default font.
https://repl.it/@ETHANSIAO/Comic-Sans-Tester , and definitely not comic sans, (the image above.) Also notice that it's the result of the repl is the exact same font as what you got, meaning you also got the default text as well, just as I did when I ran that program. What needs to happen for that to change? Or is it simply not possible at the moment?
@ETHANSIAO I looked at the available fonts with
and it appears that repl supports three fonts:
dejavusans. So repl doesn't really support fonts, except from these 3, which doesn't give much flexibility.
And I don't know what Comic Sans looks like xD