I use the wxPython libraries to develop a project I have taken to complete my studies in NTUA (at last...)
While everything worked fine, I encountered a problem with Greek encodings when I used a wxTextCtrl with a fixed (wxMODERN) font
The Greek encodings supported by wxWindows 2.3.1 are wxFONTENCODING_ISO8859_7(standard) and wxFONTENCODING_CP1253(windows), as referenced in the documentation
But when using
wxFont (10, wxMODERN, wxNORMAL, wxNORMAL, FALSE, 'Courier New', wxFONTENCODING_ISO8859_7)
i get the message
No font for displaying text in encoding �Greek (ISO-8859-7)� found.
Whould you like to select a font to be used for this encoding?
(otherwise the text in this encoding will not be shown correctly)
If I answer �No� the text in the control is shown as if I answered �Yes� and selected the desired font (�Courier New�), no mess at all...
Using the wxFontEnumerator class I can see that indeed neither �Courier New�, nor other font, supports this encoding, all fonts support the Microsoft�s alternative (i.e. wxFONTENCODING_CP1253). But when trying
wxFont (10, wxMODERN, wxNORMAL, wxNORMAL, FALSE, 'Courier New', wxFONTENCODING_CP1253)
instead, I receive a
NameError: global name wxFONTENCODING_CP1253 not defined
When I view the source of the ...\wxPython\gdi.py file (where I think all wxFONTENCODING_X constants are defined) I see that wxFONTENCODING_CP1253 is not defined, while documentation says it does (doc error or not supported for wxPython?). Anyway, since wxWindows perform the necessary conversion to wxFONTENCODING_CP1253 by itself (isn�t it?) and since I can�t access the class wxFontMapper (can I?), so I could experiment some more, I�d like to know if there is a way to get rid of that message I get every time my program is executed, or better, get the constant wxFONTENCODING_CP1253 defined correctly for use with wxPython.
Thank you for the time you gave to read this message...
···
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp