Move setting fonts to UiIntegration::startFontsBegin
This commit is contained in:
parent
32e57987a3
commit
0dfaa50d40
2 changed files with 18 additions and 18 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue