[Interest] Text is not being anti-aliased.
Bill Crocker
william.crocker at analog.com
Wed Feb 4 01:31:40 CET 2015
>
> Sure enough, If I "Turn on ClearType"
>
> Start->ControlPane->Display->
> AdjustClearTypeText/TurnOnClearType
>
> The fonts are rendered anti-aliased.
> But, I think I told Qt to override this with
>
> painter.setRenderHint(QPainter::TextAntialiasing,true);
>
> Also, I don't think a Display setting should affect
> how my program renders to a file.
>
> Search results suggested that AA required specification
> of the background color (which seems reasonable), but the
> following did not help.
>
> QBrush bg(Qt::white); painter.setBackground(bg);
> painter.setBackgroundMode(Qt::OpaqueMode);
>
> The bottom line is that my original Qt code was good enough
> for Linux but not for Windows.
>
Qt tech support suggested the following which appears
to have solved the problem, for the moment:
font.setStyleStrategy(QFont::PreferAntialias);
IMHO there are too many orthogonal ways to tell an app
that you want anti-aliased font rendering. If they all worked
I would not care.
Bill
More information about the Interest
mailing list