File konsole-nvidia-font-speed.diff of Package libqt4
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index d00215d..2661e07 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -2320,6 +2320,8 @@ static QPainterPath path_for_glyphs(const QVarLengthArray<glyph_t> &glyphs,
path.setFillRule(Qt::WindingFill);
ft->lockFace();
int i = 0;
+ const QFixed offs = QFixed::fromReal(aliasedCoordinateDelta);
+
while (i < glyphs.size()) {
QFontEngineFT::Glyph *glyph = ft->loadGlyph(glyphs[i], 0, QFontEngineFT::Format_Mono);
// #### fix case where we don't get a glyph
@@ -2329,15 +2331,15 @@ static QPainterPath path_for_glyphs(const QVarLengthArray<glyph_t> &glyphs,
Q_ASSERT(glyph->format == QFontEngineFT::Format_Mono);
int n = 0;
int h = glyph->height;
- int xp = qRound(positions[i].x);
- int yp = qRound(positions[i].y);
+ int xp = qRound(positions[i].x + offs);
+ int yp = qRound(positions[i].y + offs);
xp += glyph->x;
yp += -glyph->y + glyph->height;
int pitch = ((glyph->width + 31) & ~31) >> 3;
uchar *src = glyph->data;
- while (h--) {
+ for(;h > 0;h--) {
for (int x = 0; x < glyph->width; ++x) {
bool set = src[x >> 3] & (0x80 >> (x & 7));
if (set) {
@@ -2372,7 +2374,7 @@ void QX11PaintEngine::drawFreetype(const QPointF &p, const QTextItemInt &ti)
return;
}
- const bool xrenderPath = (X11->use_xrender
+ const bool xrenderPath = (X11->use_xrender && !ft->isBitmapFont()
&& !(d->pdev->devType() == QInternal::Pixmap
&& static_cast<const QPixmap *>(d->pdev)->data->pixelType() == QPixmapData::BitmapType));