Resp. this one (the ARGB32 translucency handling is uncritical, it's applied to the preconverted image. This should be the single point of failure)
diff --git a/kcms/kfontinst/lib/FcEngine.cpp b/kcms/kfontinst/lib/FcEngine.cpp index 19b7206..012a9d5 100644 --- a/kcms/kfontinst/lib/FcEngine.cpp +++ b/kcms/kfontinst/lib/FcEngine.cpp @@ -537,7 +537,14 @@ QImage CFcEngine::Xft::toImage(int w, int h) const if (!xImage) { return QImage(); } - return QImage(xImage->data, xImage->width, xImage->height, xImage->stride, QImage::Format_ARGB32_Premultiplied, &cleanupXImage, xImage); + QImage::Format format = QImage::Format_RGB32; + switch (DefaultDepth(QX11Info::display(), 0)) { + case 32: format = QImage::Format_ARGB32_Premultiplied; break; + case 16: format = QImage::Format_RGB16; break; + case 8: format = QImage::Format_Grayscale8; break; + default: break; + } + return QImage(xImage->data, xImage->width, xImage->height, xImage->stride, format, &cleanupXImage, xImage); }
inline int point2Pixel(int point)
Resp. this one (the ARGB32 translucency handling is uncritical, it's applied to the preconverted image. This should be the single point of failure)
diff --git a/kcms/ kfontinst/ lib/FcEngine. cpp b/kcms/ kfontinst/ lib/FcEngine. cpp kfontinst/ lib/FcEngine. cpp kfontinst/ lib/FcEngine. cpp :Xft::toImage( int w, int h) const xImage- >data, xImage->width, xImage->height, xImage->stride, QImage: :Format_ ARGB32_ Premultiplied, &cleanupXImage, xImage); :Format_ RGB32; QX11Info: :display( ), 0)) { :Format_ ARGB32_ Premultiplied; break; :Format_ RGB16; break; :Format_ Grayscale8; break; xImage- >data, xImage->width, xImage->height, xImage->stride, format, &cleanupXImage, xImage);
index 19b7206..012a9d5 100644
--- a/kcms/
+++ b/kcms/
@@ -537,7 +537,14 @@ QImage CFcEngine:
if (!xImage) {
return QImage();
}
- return QImage(
+ QImage::Format format = QImage:
+ switch (DefaultDepth(
+ case 32: format = QImage:
+ case 16: format = QImage:
+ case 8: format = QImage:
+ default: break;
+ }
+ return QImage(
}
inline int point2Pixel(int point)