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

Re: [pygame] How the get a font size



On Jan 13, 2009, at 12:09 AM, Luca wrote:

On Tue, Jan 13, 2009 at 8:37 AM, Noah Kantrowitz <noah@xxxxxxxxxxxxxx> wrote:
You clearly don't understand how C classes work. Please consult the Python
documentation.

Thanks you all guys. I perfectly understand the problem, however
adding a new attribute isn't what I was looking for.

The Front wrapper class seems the best way I can use.

For who asked: I wanted to write down an utility that given a Font can
enable a raise effect that major the size of 100%, 200%, ...

PS: you think that adding at C level a new font_size, readonly
attribute can be a valid request for future Pygame release? I think
that this can hovewer be useful...

As was mentioned, using the "size" you pass to the font initially is probably the wrong thing to do. The .size() function gives you the actual pixel size of the font.

--Noah