Hello,

How can I set the default font of a FormattedDocument when it is
empty ?

For UnformattedDocument I can use
document.set_style(0,0, {'font_name': 'some_font'}

But for FormattedDocument, I cannot do the same.

One trick could be to wait for some text to be inserted and then set
the font_name but as soon as the text becomes empty pyglet crashes
(for example, in the text_input.py example, replaces the
UnformattedDocument with a Formatted one and specify a font in the
attributes).

Any idea ?


Nicolas


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to