[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] freetype + unusual font format: What am I doing wrong?

Hi Jason,

This sounds like issue #144, unable to render text. <https://bitbucket.org/pygame/pygame/issue/144/unable-to-render-text> The issue #144 fix is included in an updated 32bit Windows installer added to the downloads page <https://bitbucket.org/pygame/pygame/issue/144/unable-to-render-text> earlier this week: pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi <https://bitbucket.org/pygame/pygame/downloads/pygame-1.9.2a0-12de2da43ecb.win32-py3.3.msi>. I have taken to adding a changeset identifier to the file name so tracking installer versions will be easer.

Lenard Lindstrom

On 13-10-04 05:50 AM, Jason Marshall wrote:
I would like to use the freetype module to render text from a BDF font file, but I am getting a vague error. I am using the 8x8 font from this site:

>>>import os
>>>os.environ["PYGAME_FREETYPE"] = "1"
>>>import pygame
>>> pygame.font
<module 'pygame.ftfont' from 'C:\\Python33\\lib\\site-packages\\pygame\\ftfont.py'>
>>> import pygame.freetype
>>> pygame.freetype.init()
>>> c64 = pygame.freetype.Font(r'C:\Users\marshalls\Downloads\c64.bdf', 8)
>>> s = c64.render('TEST', pygame.Color('white'), pygame.Color('blue'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: error return without exception set

Can somebody spot what I am doing wrong?

I am using a recent build of pygame 1.9.2pre and Python 3.3 (32-bit) on Windows.