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

Re: [pygame] PyGlyph



Alex Holkner wrote:
My test code is at:
http://kschnee.xepher.net/code/pyglyph_test.py.txt

Since then I retrofitted my example to have it subclass from
ExampleBase, and that worked -- when I exactly imitated the "hello"
demo's code. When I started to deviate from it by using my own "Draw"
function and event-handler again instead of the default "display" loop, the program hung, failing for no obvious reason to draw or respond.


Thanks for any ideas on this.

Pyglyph needs the OpenGL context to be initialised when it creates fonts (this is when it uploads texture data). So, call pygame.display.set_mode(...) before calling factory.get_font(...).

That works; thanks! I just called set_mode() to create the screen before creating the fonts. Next I'll try creating an individual font so that I can use a custom one (not a "family") other than Bitstream Vera.


Kris