Fix font preview (#1208229, kde#336089)

epel9
Rex Dieter 9 years ago
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)

@ -4,7 +4,7 @@
Name: plasma-desktop
Summary: Plasma Desktop shell
Version: 5.5.3
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+ and (GPLv2 or GPLv3)
URL: https://projects.kde.org/plasma-desktop
@ -30,6 +30,8 @@ Patch102: plasma-desktop-fedora_layout.patch
## upstream patches
## upstreamable patches
#https://bugs.kde.org/show_bug.cgi?id=336089#c43
Patch50: plasma-desktop-5.5.3-font_preview.patch
BuildRequires: libusb-devel
BuildRequires: fontconfig-devel
@ -162,6 +164,8 @@ BuildArch: noarch
%prep
%setup -q
%patch50 -p1 -b .font_preview
%if 0%{?fedora} > 22
%patch100 -p1 -b .default_favorites
%else
@ -319,6 +323,9 @@ fi
%changelog
* Sat Jan 09 2016 Rex Dieter <rdieter@fedoraproject.org> 5.5.3-2
- Fix font preview (#1208229, kde#336089)
* Thu Jan 07 2016 Daniel Vrátil <dvratil@fedoraproject.org> - 5.5.3-1
- Plasma 5.5.3

Loading…
Cancel
Save