[Interest] Text in QGLWidget looks awful

Johan RĂ¥de johan.rade at gmail.com
Thu Jun 14 12:58:07 CEST 2012


On 6/14/2012 11:53 AM, Sven Anderson wrote:

> It seems that QWidget always uses anti-aliased fonts, and QGLWidget uses
> bitmap fonts under a certain font size, in your example 12pt and
> smaller. I wouldn't say either is better. For my taste the optimum would
> be to use the bitmap font with 8pt, and anti-aliased fonts for 10pt and
> above. I have no idea how to adjust the threshold in Qt, I just know
> that font configurations often offer to adjust this threshold.
>
> Best regards
> Sven

My guess is that in a QWidget text is rendered by the OS, which will do 
hinting, antialising, subpixel rendering, kerning etc. etc.

But the OS support for text rendering can maybe not be used in a 
QGLWidget, at least not on Windows, and there Qt maybe uses its own home 
made rendering algorithm.
(Windows is not very OpenGL friendly; it tries to push you to Direct-X.)

Anyone knows if this guess is correct?




More information about the Interest mailing list