You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
1.0 KiB
20 lines
1.0 KiB
diff -up plasma-desktop-5.5.3/kcms/kfontinst/lib/FcEngine.cpp.font_preview plasma-desktop-5.5.3/kcms/kfontinst/lib/FcEngine.cpp
|
|
--- plasma-desktop-5.5.3/kcms/kfontinst/lib/FcEngine.cpp.font_preview 2016-01-06 06:12:23.000000000 -0600
|
|
+++ plasma-desktop-5.5.3/kcms/kfontinst/lib/FcEngine.cpp 2016-01-09 09:53:10.864286301 -0600
|
|
@@ -537,7 +537,14 @@ QImage CFcEngine::Xft::toImage(int w, in
|
|
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)
|