Fix font preview (#1208229, kde#336089)
parent
0790fd6fc7
commit
57b983713b
@ -0,0 +1,19 @@
|
||||
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)
|
Loading…
Reference in new issue