Hi,
Thanks for reporting the problem. The freetype module is to be released
with Pygame 1.9.2, and is stable except for bug fixes. The Pygame
Windows installers are outdated, so this bug may have already been
fixed. I will update the installers for next week. Hopefully I can add a
x86_64 version as well.
Lenard Lindstrom
On 15-03-12 06:38 AM, Bo Jangeborg wrote:
How stable is the freetype module ? I have been running into problems
with it hanging my app completly. The following code should demonstrate
the problem. Pressing ESC and you'll see that it has crashed. However
if you set the underline parameter to 'False' things work nicely.
I am running it on Windows 7.
# -*- encoding: utf-8 -*-
import pygame
from pygame import constants, event, display
from pygame import freetype
pygame.init()
freetype.init()
screen = display.set_mode((300, 200))
display.flip()
screen.fill(pygame.Color('White'))
display.flip()
f = pygame.freetype.SysFont('Times New Roman', 19)
f.underline = True
s, rec = f.render(u'Amazon')
screen.blit(s, (10, 30))
display.flip()
try:
loop = True
while loop:
for ev in event.get():
if ev.type == constants.QUIT:
loop = False
elif ev.type == constants.KEYDOWN and ev.key ==
constants.K_ESCAPE:
loop = False
finally:
freetype.quit()
display.quit()