Use Segoe UI if no Open Sans in all Win versions.

This commit is contained in:
John Preston 2017-05-01 12:25:57 +03:00
parent 33f59dd3ec
commit 392ab20a47
1 changed files with 9 additions and 9 deletions

View File

@ -90,16 +90,16 @@ void Start() {
// See https://github.com/telegramdesktop/tdesktop/issues/3276 for details. // See https://github.com/telegramdesktop/tdesktop/issues/3276 for details.
// Crash happens on "options.maxh / _t->_st->font->height" with "division by zero". // 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"). // In that place "_t->_st->font" is "semiboldFont" is "font(13 "Open Sans Semibold").
if (QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS10) { if (!regular || !bold) {
if (!regular || !bold) { if (ValidateFont(qsl("Segoe UI")) && ValidateFont(qsl("Segoe UI"), style::internal::FontBold)) {
if (ValidateFont(qsl("Segoe UI")) && ValidateFont(qsl("Segoe UI"), style::internal::FontBold)) { OpenSansOverride = qsl("Segoe UI");
OpenSansOverride = qsl("Segoe UI"); LOG(("Fonts Info: Using Segoe UI instead of Open Sans."));
}
} }
if (!semibold) { }
if (ValidateFont(qsl("Segoe UI Semibold"))) { if (!semibold) {
OpenSansSemiboldOverride = qsl("Segoe UI 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 #endif // Q_OS_WIN