Bug 451016 - Qt3 xft'less font rendering is completely broken
Qt3 xft'less font rendering is completely broken
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: xorg-x11-server (Show other bugs)
9
i386 Linux
low Severity low
: ---
: ---
Assigned To: Adam Jackson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-12 08:26 EDT by Artem S. Tashkinov
Modified: 2008-06-19 13:13 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-19 13:13:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This is how fonts are rendered by Qt3 without libXft (5.01 KB, image/png)
2008-06-12 08:26 EDT, Artem S. Tashkinov
no flags Details
KDE3 konsole (run with --noxft) with Xserver 1.5 (132.02 KB, image/png)
2008-06-12 11:12 EDT, Artem S. Tashkinov
no flags Details

  None (edit)
Description Artem S. Tashkinov 2008-06-12 08:26:10 EDT
Description of problem: I need to run some Qt3 applications with disabled libXft
font rendering. After upgrading from Fedora 8 to Fedora 9 all those applications
stopped working correctly. Instead of fonts I see some unreadable garbage.

Version-Release number of selected component (if applicable):

How reproducible: Always

Steps to Reproduce:

1) install g++, qt3 and qt3 devel

2) cat main.cpp

#include <qapplication.h>
#include <qfont.h>
#include <qlabel.h>
#include <qframe.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qfontdialog.h>

static bool s_antialias;

class MyWidget : public QFrame
{
    Q_OBJECT

    public:
        MyWidget(QWidget *parent = 0);
        void setVTFont(const QFont& f);
    public slots:
        void editFont();
};

#include "main.moc"

MyWidget::MyWidget(QWidget *parent) : QFrame(parent)
{
    s_antialias = true;
    QLabel *label = new QLabel("This is sample text", this);
    QPushButton *button = new QPushButton("Change Font...", this);
    connect(button, SIGNAL(clicked()), this, SLOT(editFont()));

    QVBoxLayout *layout = new QVBoxLayout(this);
    layout->addWidget(button);
    layout->addWidget(label);
}

void MyWidget::editFont()
{
    bool ok;
    QFont font = QFontDialog::getFont(
                    &ok, QFont( "Helvetica [Cronyx]", 10 ), this );
    if(ok)
    {
        setVTFont(font);
    }
}

void MyWidget::setVTFont(const QFont& f)
{
    QFont font = f;
    if (!s_antialias)
        font.setStyleStrategy( QFont::NoAntialias );
    QFrame::setFont(font);
    fontChange(font);
}

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    MyWidget *widget = new MyWidget;

    QString str(app.argv()[1]);
    if(str == "--noxft")
        s_antialias = false;

    widget->setVTFont(app.font());

    widget->show();
    app.setMainWidget(widget);
    return app.exec();
}

qmake -project
qmake
make

./application --noxft
  
Actual results: Garbage

Expected results: Normal font rendering

Additional info: I have tested this problem with nv and nvidia drivers.
Comment 1 Artem S. Tashkinov 2008-06-12 08:26:10 EDT
Created attachment 309057 [details]
This is how fonts are rendered by Qt3 without libXft
Comment 2 Artem S. Tashkinov 2008-06-12 11:10:34 EDT
My GPU is NVIDIA 8800GT.

Several observations: 

1) With vesa video driver everything works fine (alas, the user interface is
very unresponsive and everything feels sooooo slow).

2) With *nv* and nvidia drivers everything is broken.

3) I haven't test noveou driver because I run vanilla 2.6.25.6 kernel with no
patches applied.

4) After I have downgraded to xorg-x11-server-Xorg-1.3.0.0-33.fc8.i386
everything works fine with *any* driver, thus the culprit is *definitely* the
new X.org server.

This bug is *not* reproducible on any hardware other than 8 series of NVIDIA GPU's.
Comment 3 Artem S. Tashkinov 2008-06-12 11:12:04 EDT
Created attachment 309082 [details]
KDE3 konsole (run with --noxft) with Xserver 1.5
Comment 4 Dave Airlie 2008-06-12 18:57:48 EDT
can you upgrade to the latest F9 server here:
http://kojipkgs.fedoraproject.org/packages/xorg-x11-server/1.4.99.902/3.20080612.fc9/

It should be in updates quite soon and lets us know if it still happens?
Comment 5 Artem S. Tashkinov 2008-06-13 03:54:57 EDT
I will notify you as soon as I upgrade.
Comment 6 Jason Salcido 2008-06-16 09:31:50 EDT
I have the same problem with fonts on F9.  I have upgraded to latest xorg server
and still have this problem.  I ran the application and get smudged fonts with
either --noxft  or changing the font to something like Console.  I have an
nVidia Quadro-FX 570M (thinkpad) using nvidia driver. I have been pursuing a
similar bug in wine with font rendering. 

http://www.codeweavers.com/support/forums/general/?;t=26;msg=34034
Comment 7 Artem S. Tashkinov 2008-06-16 12:22:33 EDT
The X.org update from comment #4 hasn't changed anything. The problem persists.
Comment 8 Matthew Gillen 2008-06-18 09:44:23 EDT
I can confirm the same font problem when using the proprietary NVidia driver. 
The problem is solved (both for the QT application cited above, and crossover
office) by using the (open source) 'nv' Xorg driver (instead of the proprietary
'nvidia' one).

Incidentally, NVidia seems to be working on fixing the proprietary driver:
http://www.nvnews.net/vbulletin/showthread.php?t=114446
Quote: "This is a known issue that will be fixed in the next driver release."

For the record, I'm running Fedora 9 x86_64, on a dell laptop with an NVidia
Quadro NVS 135M video card (using nvidia proprietary driver version 173.14.05).

I suggest closing the ticket, since the resolution seems to be squarely in
NVidia's hands.
Comment 9 Artem S. Tashkinov 2008-06-19 13:13:34 EDT
NVIDIA 173.14.09 driver has solved the issue but it still persists as for 'nv'
open source driver.

Note You need to log in before you can comment on or make changes to this bug.