Try this.
font1 = pygame.font.SysFont('ActionIsShaded', 12)
redyugi
Junior Poster in Training
80 posts since Jul 2009
Reputation Points: 15
Solved Threads: 30
Perhaps try lower case? I don't have Python on this computer so I can't test it right now
redyugi
Junior Poster in Training
80 posts since Jul 2009
Reputation Points: 15
Solved Threads: 30
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852
Here is a good PyGame font example ...
""" customFont.py
use of a customized font with PyGame:
http://www.cs.iupui.edu/~aharris/pygame/ch05/customFont.py
download custom font from:
http://www.cs.iupui.edu/~aharris/pygame/ch05/GringoNights.ttf
"""
import pygame
pygame.init()
def main():
screen = pygame.display.set_mode((640, 480))
pygame.display.set_caption("display some text")
background = pygame.Surface(screen.get_size())
background = background.convert()
# rgb tuple (0, 0, 0) is black
background.fill((0, 0, 0))
# makes sure the font file is in the working directory
# or give the full path name
myFont = pygame.font.Font("GringoNights.ttf", 40)
# rgb tuple (255, 0, 0) is red
# rgb tuple (255, 255, 0) is yellow
label = myFont.render("Python in the Wild West", 1, (255, 0, 0))
# use clock if you want to animate something
#clock = pygame.time.Clock()
keepGoing = True
while keepGoing:
#clock.tick(30)
for event in pygame.event.get():
if event.type == pygame.QUIT:
keepGoing = False
screen.blit(background, (0, 0))
screen.blit(label, (100, 100))
pygame.display.flip()
if __name__ == "__main__":
main()
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417