RE: [GD-General] FreeType
Brought to you by:
vexxed72
|
From: Ignacio C. <ica...@nv...> - 2006-01-03 23:12:48
|
Brian,
I think that the issues you are seen could be related to the freetype =
autohinter. I got much better looking results with the patented bytecode =
hinter. However, that was some time ago and since then I've heard that =
the autohinter has become much better and produces comparable results =
now.
If you are going to generate strings or words on the fly using the =
autohinter might not be an option, but if you dynamically link freetype =
you just leave that up to the user.
--
Ignacio Casta=F1o
ica...@nv...=20
> -----Original Message-----
> From: gam...@li...=20
> [mailto:gam...@li...] On=20
> Behalf Of Brian Hook
> Sent: Monday, January 02, 2006 11:17 PM
> To: gam...@li...
> Subject: Re: [GD-General] FreeType
>=20
> > I believe the problem you are seeing is that the fonts are small
> > _and_ antialiased.=20
>=20
> Well, yeah. But un-antialiased and they look bad, just in a=20
> different=20
> way =3D)
>=20
> I ended up hacking a simple Python package that lets me render a=20
> string in a given font to a buffer, which I can then insert into a=20
> texture. I don't have the higher level string caching in place, but=20
> so far the results are very promising in terms of quality. =20
> The API is=20
> pretty brute force simple:
>=20
> import winfont
>=20
> 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')
>=20
> I'll worry about the string caching and subtex modifications next and=20
> see if this is all everyone claims it is =3D)
>=20
> Brian
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep=20
> through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. =20
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dick
> _______________________________________________
> Gamedevlists-general mailing list
> Gam...@li...
> https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_idU7
>=20
|