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

Re: [pygame] SegFault rendering unicode characters



Just an idea, but maybe the default font doesn't have a character >= \x80  ...  That doesn't explain why it is crashing, but ...

Jesse

ps.  I am just getting into unicode fonts in pygame.  Have you gotten unicode (multi-key ??) input to work (japanese/other roman characters, ....)

-----Original Message-----
From: "Andrew Baldwin" <andrew@dehabit.info>
To: <pygame-users@seul.org>
Date: Fri, 4 Oct 2002 10:08:44 +0300
Subject: [pygame] SegFault rendering unicode characters

Using pygame-1.5.3 with python 2.2.1 on win2k, I don't seem to be able to
use pygame.font to render any non-ascii characters. If I try to render a
character such as u'\x80' or greater, python crashes.

Example program to demonstrate:

import pygame
print pygame.init()
print pygame.font.Font(None,30).render(u'\x50',0,(0,0,0)) # Unicode < x80 ok
print pygame.font.Font(None,30).render(u'\x80',0,(0,0,0)) # Unicode >= x80
crashes

Here is what I see if this is run from the command line:

(6, 0)
<Surface(14x28x8 SW)>
Pygame Parachute Traceback:
  File "D:\crash.py", line 4, in ?
Fatal Python error: (pygame parachute) Segmentation Fault

abnormal program termination

(Note: Everything else about my setup seems to be fine - all the pygame
examples work without problems)

Pygame bug, SDL bug, or Freetype bug?
(apologies if this message has appeared on the list twice...)


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org