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:
@@ -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();
|
||||
|
@@ -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() {
|
||||
|
Reference in New Issue
Block a user