Re: [GD-General] FreeType
Brought to you by:
vexxed72
From: Brian H. <ho...@bo...> - 2006-01-03 07:17:01
|
> I believe the problem you are seeing is that the fonts are small > _and_ antialiased. Well, yeah. But un-antialiased and they look bad, just in a different way =3D) I ended up hacking a simple Python package that lets me render a string in a given font to a buffer, which I can then insert into a texture. I don't have the higher level string caching in place, but so far the results are very promising in terms of quality. The API is pretty brute force simple: import winfont f =3D winfont.createfont( 'Courier New', height=3D16,italic=3DTrue) buf,w,h =3D f.render('Hello world!',(255,255,255),(64,64,64)) surf =3D pygame.image.fromstring( buf, w, h, "RGBX", True ) pygame.image.save( surf, 'test.tga') I'll worry about the string caching and subtex modifications next and see if this is all everyone claims it is =3D) Brian |