[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Segmentation Fault creating font



Weber, Henrik wrote:
When I try to call the Font function with a parameter different from None I
get a segmentation fault like this:

import pygame
pygame.font.init()
f1 = pygame.font.Font(None, 14)
f2 = pygame.font.Font("arial.ttf", 10)
Pygame Parachute Traceback:
  File "<stdin>", line 1, in ?
Fatal Python error: (pygame parachute) Segmentation Fault
the problem is that Font will need a full path to the font file. it cannot find system fonts. but, it should not be throwing a segfault, i'll see if i can figure out why that is, but likely a foolish SDL_ttf thing. perhaps i can workaround it in pygame by first doing a 'isfile' test on the string?

not too long ago we got some excellent code on the mailing list that does find the full paths to fonts on the system path. i'm still planning to roll this into pygame's font module.

--
"Neither will I tell you by what authority I do these things"
pete*shinners.org