[wxpython-users] why doesn't fontlist sort work ?
raffaello
barbarossa.platz at gmail.com
Fri May 2 13:26:27 PDT 2008
>From jonhattan <jonhattan at faita.net> I received on December 23, 2007 the
following answer to the same question:
You have to subclass wx.FontEnumerator and override OnFacename:
class FE(wx.FontEnumerator):
def OnFacename(self, fontname):
print fontname
fe =3D FE()
fe.EnumerateFacenames(wx.FONTENCODING_SYSTEM, fixedWidthOnly =3D True)
Andale Mono
Bitstream Vera Sans Mono
Counterscraps
Courier
Courier 10 Pitch
Courier New
DejaVu Sans Mono
FreeMono
Larabiefont
Lucida Sans Typewriter
Mitra Mono
Monofonto
Monospace
Nimbus Mono L
TlwgMono
TlwgTypewriter
Unispace
-- jonhattan
And jonhattan code works.
2008/5/2 Stef Mientki <s.mientki at ru.nl>:
>
>
> Tim Roberts wrote:
>
> > On Fri, 02 May 2008 10:14:28 +0200, Stef Mientki <s.mientki at ru.nl>
> > wrote:
> >
> > > hello,
> > > I want to see all available fonts,
> > > so I used the following:
> > >
> > > fonts =3D wx.FontEnumerator ()
> > > fonts.EnumerateFacenames ()
> > > fontList =3D fonts.GetFacenames ()#.sort()
> > > print fontList
> > >
> > > now if I want to see the list ordered,
> > > I would expect to add the sort() method
> > > (I've verified that the type of fontList equals list),
> > > but I get None ?
> > >
> > >
> >
> > Here again, we have one of the "classic Python blunders". ;)
> >
> you mean a blunder of Python ;-)
> Thanks Tim,
> I now remember, but for how long ?
>
> cheers,
> Stef
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200805=
02/9464eec4/attachment.htm
More information about the wxpython-users
mailing list