aboutsummaryrefslogtreecommitdiffstats
path: root/testing/telegram-desktop/system-wide-fonts.patch
diff options
context:
space:
mode:
authorAlex Raschi <raschi.alex@gmail.com>2019-01-02 12:51:39 +0100
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-01-03 07:46:47 +0000
commit24e019a671801ed30486c490cc6b36406b144357 (patch)
tree3f7481813429b4397c72441b76b093f09b921e05 /testing/telegram-desktop/system-wide-fonts.patch
parent742447ce94bd771ee80df9e6859de15803d0d9bb (diff)
downloadaports-24e019a671801ed30486c490cc6b36406b144357.tar.gz
aports-24e019a671801ed30486c490cc6b36406b144357.tar.bz2
aports-24e019a671801ed30486c490cc6b36406b144357.tar.xz
testing/telegram-desktop: new aport
https://desktop.telegram.org/ Telegram Desktop messaging app
Diffstat (limited to 'testing/telegram-desktop/system-wide-fonts.patch')
-rw-r--r--testing/telegram-desktop/system-wide-fonts.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/telegram-desktop/system-wide-fonts.patch b/testing/telegram-desktop/system-wide-fonts.patch
new file mode 100644
index 0000000000..c89222986b
--- /dev/null
+++ b/testing/telegram-desktop/system-wide-fonts.patch
@@ -0,0 +1,34 @@
+Description: Remove links to packaged Open Sans font
+ This makes Telegram Desktop use system-wide fonts.
+ Warnings about non-existent fonts in resources are also disabled.
+Author: Nicholas Guriev <guriev-ns@ya.ru>
+Bug-Debian: https://bugs.debian.org/890341
+Last-Update: Sat, 31 Mar 2018 14:36:39 +0300
+
+--- a/Telegram/Resources/qrc/telegram.qrc
++++ b/Telegram/Resources/qrc/telegram.qrc
+@@ -42,9 +42,6 @@
+ <file alias="js/script.js">../export_html/js/script.js</file>
+ </qresource>
+ <qresource prefix="/gui">
+- <file alias="fonts/OpenSans-Regular.ttf">../fonts/OpenSans-Regular.ttf</file>
+- <file alias="fonts/OpenSans-Bold.ttf">../fonts/OpenSans-Bold.ttf</file>
+- <file alias="fonts/OpenSans-Semibold.ttf">../fonts/OpenSans-Semibold.ttf</file>
+ <file alias="art/bg.jpg">../art/bg.jpg</file>
+ <file alias="art/bg_initial.jpg">../art/bg_initial.jpg</file>
+ <file alias="art/logo_256.png">../art/logo_256.png</file>
+--- a/Telegram/SourceFiles/ui/twidget.cpp
++++ b/Telegram/SourceFiles/ui/twidget.cpp
+@@ -70,9 +70,9 @@ void Start() {
+ }
+ Started = true;
+
+- auto regular = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Regular.ttf"), qsl("Open Sans"));
+- auto bold = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Bold.ttf"), qsl("Open Sans"), style::internal::FontBold);
+- auto semibold = LoadCustomFont(qsl(":/gui/fonts/OpenSans-Semibold.ttf"), qsl("Open Sans Semibold"));
++ auto regular = ValidateFont(qsl("Open Sans"));
++ auto bold = ValidateFont(qsl("Open Sans"), style::internal::FontBold);
++ auto semibold = ValidateFont(qsl("Open Sans Semibold"));
+
+ #ifdef Q_OS_WIN
+ // Attempt to workaround a strange font bug with Open Sans Semibold not loading.