From 550f2b2f7786e7a00f2e1656ee14713afc730e4863f9335c6f5125831b686d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 29 Jan 2019 11:09:37 +0000 Subject: [PATCH] - Add patch to fix selection of condensed fonts instead of regular ones: * kde5-font-width.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=752 --- kde5-font-width.patch | 29 +++++++++++++++++++++++++++++ libreoffice.changes | 3 +++ libreoffice.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 kde5-font-width.patch diff --git a/kde5-font-width.patch b/kde5-font-width.patch new file mode 100644 index 0000000..e01144b --- /dev/null +++ b/kde5-font-width.patch @@ -0,0 +1,29 @@ +From 0bdfb521f8a16be634b073d45d07c34b51f8e5e4 Mon Sep 17 00:00:00 2001 +From: Jan-Marek Glogowski +Date: Tue, 29 Jan 2019 11:35:55 +0100 +Subject: [PATCH] KDE5 map QFont::stretch() == 0 to WIDTH_DONTKNOW + +From the Qt5 documentation: "QFont::AnyStretch / 0: Accept any +stretch matched using the other QFont properties (added in Qt +5.8)". So this maps 0 to LO's WIDTH_DONTKNOW, which fixes the +too narrow font selection in the KDE5 backend, when applying the +KDE5 font setting to LO. + +Change-Id: I5f1a62d6c314c0766b540869c49c72bc3f6821c3 +--- + +diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx +index ec4a7ff..d3a1396 100644 +--- a/vcl/unx/kde5/KDE5SalFrame.cxx ++++ b/vcl/unx/kde5/KDE5SalFrame.cxx +@@ -85,7 +85,9 @@ + + // set width + int nStretch = rQFont.stretch(); +- if (nStretch <= QFont::UltraCondensed) ++ if (nStretch == 0) // QFont::AnyStretch since Qt 5.8 ++ aInfo.m_eWidth = WIDTH_DONTKNOW; ++ else if (nStretch <= QFont::UltraCondensed) + aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED; + else if (nStretch <= QFont::ExtraCondensed) + aInfo.m_eWidth = WIDTH_EXTRA_CONDENSED; diff --git a/libreoffice.changes b/libreoffice.changes index 70df4d7..3c11568 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -5,6 +5,9 @@ Fri Jan 25 09:12:12 UTC 2019 - Tomáš Chvátal of gtk3 KDE wrapper bsc#1123131 - Add patch to fix detection of KDE session on wayland: * kde5-detection.patch +- Add patch to fix selection of condensed fonts instead of regular + ones: + * kde5-font-width.patch ------------------------------------------------------------------- Thu Jan 24 13:19:29 UTC 2019 - Tomáš Chvátal diff --git a/libreoffice.spec b/libreoffice.spec index 6b12ac7..e7e052a 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -102,6 +102,7 @@ Patch3: mediawiki-no-broken-help.diff Patch4: java112.patch Patch5: old-boost.patch Patch6: kde5-detection.patch +Patch7: kde5-font-width.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: %{name}-share-linker @@ -964,6 +965,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %patch3 %patch4 -p1 %patch6 -p1 +%patch7 -p1 %patch990 -p1 # Disable some of the failing tests (some are random)