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 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 @@ ../export_html/js/script.js - ../fonts/OpenSans-Regular.ttf - ../fonts/OpenSans-Bold.ttf - ../fonts/OpenSans-Semibold.ttf ../art/bg.jpg ../art/bg_initial.jpg ../art/logo_256.png --- 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.