[osg-users] How to disable Antialiasing of an osg::Text

Lv Qing donlvqing at msn.com
Thu Mar 2 09:41:35 PST 2017


Hi,

    In linux we are using  osg::Text to display some chinese characters.Then
 we find the  osg::Text looks a little blur when the size of characters is small.Or,the Black characters  seems a little gray when the character size is small.I have setFontSolution(128,128),it not help.

   Then I fond our old app which using QT to draw text,and with the same font,QT text looks better than  osg::Text.

   I fond QT use QPaint to loading font and drawing text ,and It can enable or disable Antialiasing of text  like below.

    

Code:
class Q_GUI_EXPORT QPainter
{
    Q_DECLARE_PRIVATE(QPainter)
    Q_GADGET
    Q_FLAGS(RenderHint RenderHints)

public:
    enum RenderHint {
        Antialiasing = 0x01,
        TextAntialiasing = 0x02,
        SmoothPixmapTransform = 0x04,
        HighQualityAntialiasing = 0x08,
        NonCosmeticDefaultPen = 0x10
    };




     So my question is ,does osg can  enable or disable Antialiasing to an osg::Text?




... 

Thank you!

Cheers,
Lv
Code:




------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70395#70395








More information about the osg-users mailing list