[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] freetype + unusual font format: What am I doing wrong?
- To: Pygame_mailing_list <pygame-users@xxxxxxxx>
- Subject: [pygame] freetype + unusual font format: What am I doing wrong?
- From: Jason Marshall <jmm0@xxxxxxxxx>
- Date: Fri, 4 Oct 2013 05:50:51 -0700 (PDT)
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 04 Oct 2013 08:51:00 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1380891051; bh=VVZm+Wv/bZLjToZ6XmyUTEXEeelBcqQsquXly0a1/pI=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=ICKOFtOpIHCDCBw5lkhJMcXTaNH8NlQeFYHVeokfbpB06Efo3VoEZPjvBMHphLy1EVtcBoG43LB6OH6ZtvFPF9AT7I4/JDgZM5J5xY+jJQ8CK/U4IEIgW+kiHwoWtb05Htl/9PU6kXbfEljwT+p+7ZGt/vSme2TTAEC54MjQiJ0=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=3ztnxul9qqkmIbgIK/vIm499RiTCFJLmj4/zcz3FbHr8vIjvsiPCzFjNoNnplqUm6XoxQF68FxJB2gwI+QamcN6K2O/dXy+dFfwCZfoL8hq0Fppry2wMwdduIn8SJ6Vp1rlohAhrdI+m9nTSFtkZB9CSrVDkJm8Avl0mV5gdX4k=;
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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:
http://beej.us/c64bdf/c64bdf/c64.bdf
>>> 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.
Thanks,
Jason