1
0
telegram-desktop/0005-Use-system-wide-fonts.patch
Marcel Kuehlhorn 7852f1427c Accepting request 765395 from home:tux93
- Update to 1.9.4
  * Bug fixes and other minor improvements.
- Removed patches, option to use distribution libraries
  added upstream:
  * 0001-Dynamic-linking-system-libs.patch
  * 0002-Dynamic-linking-system-qt.patch
  * 0004-gtk3.patch
- Added patches for dependencies not available from repos:
  * 0001-use-bundled-range.patch
  * 0002-use-bundled-rlottie.patch

OBS-URL: https://build.opensuse.org/request/show/765395
OBS-URL: https://build.opensuse.org/package/show/server:messaging/telegram-desktop?expand=0&rev=119
2020-01-22 11:30:17 +00:00

65 lines
2.0 KiB
Diff

Do not force custom fontconfig configuration.
--- a/Telegram/lib_ui/fonts/fonts.qrc
+++ b/Telegram/lib_ui/fonts/fonts.qrc
@@ -1,10 +1,4 @@
<RCC>
<qresource prefix="/gui/fonts">
- <file>DAOpenSansRegular.ttf</file>
- <file>DAOpenSansRegularItalic.ttf</file>
- <file>DAOpenSansBold.ttf</file>
- <file>DAOpenSansBoldItalic.ttf</file>
- <file>DAOpenSansSemibold.ttf</file>
- <file>DAOpenSansSemiboldItalic.ttf</file>
</qresource>
</RCC>
--- a/Telegram/lib_ui/ui/style/style_core_font.cpp
+++ b/Telegram/lib_ui/ui/style/style_core_font.cpp
@@ -94,12 +94,12 @@
FontTypesCount,
};
QString FontTypeNames[FontTypesCount] = {
- "DAOpenSansRegular",
- "DAOpenSansRegularItalic",
- "DAOpenSansBold",
- "DAOpenSansBoldItalic",
- "DAOpenSansSemibold",
- "DAOpenSansSemiboldItalic",
+ "Open Sans",
+ "Open Sans",
+ "Open Sans",
+ "Open Sans",
+ "Open Sans Semibold",
+ "Open Sans Semibold",
};
int32 FontTypeFlags[FontTypesCount] = {
0,
@@ -135,7 +135,7 @@
for (auto i = 0; i != FontTypesCount; ++i) {
const auto name = FontTypeNames[i];
const auto flags = FontTypeFlags[i];
- areGood[i] = LoadCustomFont(":/gui/fonts/" + name + ".ttf", name, flags);
+ areGood[i] = ValidateFont(name, flags);
Overrides[i] = name;
#ifdef Q_OS_WIN
// Attempt to workaround a strange font bug with Open Sans Semibold not loading.
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp.orig 2020-01-17 22:34:25.882017929 +0100
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp 2020-01-17 22:34:56.362548378 +0100
@@ -82,8 +82,6 @@ void FallbackFontConfig() {
return;
}
}
-
- QFile(":/fc/fc-custom.conf").copy(custom);
#endif // !DESKTOP_APP_USE_PACKAGED
}
--- a/Telegram/lib_ui/qt_conf/linux.qrc.orig 2020-01-17 22:38:50.902630063 +0100
+++ b/Telegram/lib_ui/qt_conf/linux.qrc 2020-01-17 22:39:09.298950213 +0100
@@ -3,6 +3,5 @@
<file alias="qt.conf">qt_linux.conf</file>
</qresource>
<qresource prefix="/fc">
- <file>fc-custom.conf</file>
</qresource>
</RCC>