2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Move setting fonts to UiIntegration::startFontsBegin

This commit is contained in:
RadRussianRus
2020-04-25 02:14:07 +03:00
parent 32e57987a3
commit 0dfaa50d40
2 changed files with 18 additions and 18 deletions

View File

@@ -183,24 +183,6 @@ Application::~Application() {
void Application::run() {
Kotato::JsonSettings::Start();
if (!cMainFont().isEmpty()) {
style::internal::CustomMainFont = cMainFont();
}
if (!cSemiboldFont().isEmpty()) {
style::internal::CustomSemiboldFont = cSemiboldFont();
}
if (cSemiboldFontIsBold()) {
style::internal::CustomSemiboldIsBold = cSemiboldFontIsBold();
}
if (!cMonospaceFont().isEmpty()) {
style::internal::CustomMonospaceFont = cMonospaceFont();
}
if (cUseSystemFont()) {
style::internal::UseSystemFont = cUseSystemFont();
}
if (cUseOriginalMetrics()) {
style::internal::UseOriginalMetrics = cUseOriginalMetrics();
}
style::internal::StartFonts();
ThirdParty::start();

View File

@@ -54,6 +54,24 @@ void UiIntegration::activationFromTopPanel() {
void UiIntegration::startFontsBegin() {
Platform::FallbackFontConfigCheckBegin();
if (!cMainFont().isEmpty()) {
style::internal::CustomMainFont = cMainFont();
}
if (!cSemiboldFont().isEmpty()) {
style::internal::CustomSemiboldFont = cSemiboldFont();
}
if (cSemiboldFontIsBold()) {
style::internal::CustomSemiboldIsBold = cSemiboldFontIsBold();
}
if (!cMonospaceFont().isEmpty()) {
style::internal::CustomMonospaceFont = cMonospaceFont();
}
if (cUseSystemFont()) {
style::internal::UseSystemFont = cUseSystemFont();
}
if (cUseOriginalMetrics()) {
style::internal::UseOriginalMetrics = cUseOriginalMetrics();
}
}
void UiIntegration::startFontsEnd() {