Re: [pygame] Module I made for drawing text with pygame

2015-03-16 Thread bw
Yes...I have acquired clunx capacitor 518400. No one can stop me now. 
And with this new font module I will win the Pyweek!


Oh, uh. Sorry, got a little excited. :)

I really like the convenience of this module, Christopher. I look 
forward to playing with it some. Some of those effects and alignments 
are a bit of a pain to code from scratch. The interface is as easy to 
use as an auto-clunker!


Very nice.

Those are some handsome fonts.

Gumm

On 3/16/2015 9:13 PM, Christopher Night wrote:
Please let me know if you have any feedback or criticism on the module 
I have written here:

https://github.com/cosmologicon/pygame-text

This module provides what is, for me, a more convenient interface to 
drawing text with pygame.font. It also provides a few effects, such as 
outlines and drop shadows. I plan to use this module in future PyWeeks.


Thanks,
Christopher




[pygame] Module I made for drawing text with pygame

2015-03-16 Thread Christopher Night
Please let me know if you have any feedback or criticism on the module I
have written here:
https://github.com/cosmologicon/pygame-text

This module provides what is, for me, a more convenient interface to
drawing text with pygame.font. It also provides a few effects, such as
outlines and drop shadows. I plan to use this module in future PyWeeks.

Thanks,
Christopher


Re: [pygame] freetype problem

2015-03-16 Thread Lenard Lindstrom

Hi again,

This is definitely a bug. I have opened issue Issue #237 
. 
It will be fixed for Pygame 1.9.2 release.


Lenard Lindstrom

On 15-03-12 12:27 PM, Bo Jangeborg wrote:

Thanks for the answer. While I am at it I noticed that
when using render() and render_to() with a string with trailing
spaces,  one gets trimed of.

Bo)

Lenard Lindstrom skrev den 2015-03-12 18:15:

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()