[wxPython-users] LCD vs CRT Monitors Issues (!)

Andrea Gavana andrea.gavana at gmail.com
Thu Nov 1 17:27:44 PDT 2007


Hi Robin,

On 11/2/07, Robin Dunn wrote:
> Andrea Gavana wrote:
>
> > Curiously, just replacing this line:
> >
> > fnt = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
> >
> > with this line:
> >
> > fnt = wx.SystemSettings_GetFont(wx.SYS_ANSI_VAR_FONT)
> >
> > Fixed the issue. I have no idea why, but it works.
>
> Probably because the font used in that case on your system is either a
> bitmap font (instead of a vector format like TTF) or doesn't specify any
> hinting that the system will use for anti-aliased drawing.
>
> I expect that the only way to truly solve this for any font is to make
> sure that the text only gets drawn once.  If it needs to be drawn again
> for some reason, such as it is part of the update region in a paint
> event, then you either need to redraw everything 'behind' it too, or
> don't use dc.SetBackgroundMode(wx.TRANSPARENT).  To better see what is
> happening you should get a tool that lets you zoom in on the display and
> see the individual pixels magnified.  If you look at some text then if
> it's using anti-aliasing (or 'font smoothing' or 'ClearType') you'll see
> some pixels along the curves and corners that are not fully black, or
> that may even have some color.  If the same text gets redrawn at the
> same place then those aliased pixels will be blended with the ones that
> are already there and they will become a little bit darker, and a little
> more dark the next time it is drawn.

I guess the only thing I have to do is what you said... let's hope I
will be able to find out why is painting twice the same text :-D

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/




More information about the wxpython-users mailing list