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

Re: [pygame] how to render text correctly?



inhahe <inhahe@xxxxxxxxx>:

say i want to render some text like "blah"
(for those without html, that's a word with one of its letters underlined.)
the only way i can see to do this is to render each section separately. the
part without the underline, then make the font underlined, then part with,
the part without, etc.   but then the spacing between the letters is messed
up. it can't put the letters as close together as it should, so it looks
awkward.  is there any way around this?  an OS (even if it's
windows-specific) or SDL function to render text from rtf or some other
format?

Mabye there's a way, but I cannot think of any, which needs a lot of work.
http://sdlpango.sourceforge.net/ should be a good point to start with however.

and if not, will pygame support such a thing in the future?

Yes, we thought about making a pango interface for complex text rendering,
which shall replace the font module by time.

Regards
Marcus