Werner,
Basically my code has a Frame class in which I have a Panel (we'll
call it p) and I'm using wx.StaticText to display text. On my Mac the
wx.SWISS font family works great. So within my Frame class I have:
self.font = (16, wx.SWISS, wx.NORMAL, wx.NORMAL)
.
[some intervening code]
.
text = wx.StaticText(p, wx.ID_ANY, str)
text.SetFont(self.font)
The variable str might be something like u'r\edgain\u1d38' which
should display as rígain with a superscript L at the end (nominative
singular of the Old Irish word for 'queen' which causes lenition [thus
the L] on certain words following it).
I've got it working on Windows now anyway (by checking for platform
and then adding self.font.SetFaceName('DejaVu Sans') if sys.platform
== 'win32'), but thanks for the assist.
···
On Jun 23, 4:27 am, werner <wbru...@free.fr> wrote:
Hi,
On 23/06/2010 04:30, C� Chulainn wrote:
> It's possible someone else has had this problem and there is a post
> which resolved it for them, but I've searched and can't find a
> solution.
> I'm having difficulty with displaying certain unicode characters. It
> could be a font issue, but I've tried changing fonts with no positive
> results.
> In several places in my program I want to be able to display uppercase
> letters as superscripts, in particular "H" (U+1D34), "L" (U+1D38), and
> "N" (U+1D3A). When I was using Tkinter, these displayed properly on
> my Windows XP machine but they showed up as Chinese characters on my
> Mac. I've been rewriting my program to use wxPython instead and now
> they show up properly on my Mac but are displayed as narrow, empty
> boxes (unprintable characters) on my Windows XP machine.
> Any thoughts?
What is your actual code doing all this?
I just tried it without doing anything special on my Windows 7 machine
with Py 2.5 and wxPython 2.8.10.0 - see attached.
Werner
unicodeIssue.py
1KViewDownload