From 392ab20a476f9e61f32e3e7053aeba1f16930c0b Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 May 2017 12:25:57 +0300 Subject: [PATCH] Use Segoe UI if no Open Sans in all Win versions. --- Telegram/SourceFiles/ui/twidget.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp index 5162ac92a..04fad32ba 100644 --- a/Telegram/SourceFiles/ui/twidget.cpp +++ b/Telegram/SourceFiles/ui/twidget.cpp @@ -90,16 +90,16 @@ void Start() { // See https://github.com/telegramdesktop/tdesktop/issues/3276 for details. // Crash happens on "options.maxh / _t->_st->font->height" with "division by zero". // In that place "_t->_st->font" is "semiboldFont" is "font(13 "Open Sans Semibold"). - if (QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS10) { - if (!regular || !bold) { - if (ValidateFont(qsl("Segoe UI")) && ValidateFont(qsl("Segoe UI"), style::internal::FontBold)) { - OpenSansOverride = qsl("Segoe UI"); - } + if (!regular || !bold) { + if (ValidateFont(qsl("Segoe UI")) && ValidateFont(qsl("Segoe UI"), style::internal::FontBold)) { + OpenSansOverride = qsl("Segoe UI"); + LOG(("Fonts Info: Using Segoe UI instead of Open Sans.")); } - if (!semibold) { - if (ValidateFont(qsl("Segoe UI Semibold"))) { - OpenSansSemiboldOverride = qsl("Segoe UI Semibold"); - } + } + if (!semibold) { + if (ValidateFont(qsl("Segoe UI Semibold"))) { + OpenSansSemiboldOverride = qsl("Segoe UI Semibold"); + LOG(("Fonts Info: Using Segoe UI Semibold instead of Open Sans Semibold.")); } } #endif // Q_OS_WIN