diff --git a/ui/integration.cpp b/ui/integration.cpp index be754c5..68db7c1 100644 --- a/ui/integration.cpp +++ b/ui/integration.cpp @@ -36,6 +36,12 @@ void Integration::textActionsUpdated() { void Integration::activationFromTopPanel() { } +void Integration::startFontsBegin() { +} + +void Integration::startFontsEnd() { +} + std::shared_ptr Integration::createLinkHandler( EntityType type, const QString &text, diff --git a/ui/integration.h b/ui/integration.h index f420a58..c01cba5 100644 --- a/ui/integration.h +++ b/ui/integration.h @@ -39,6 +39,9 @@ public: virtual void textActionsUpdated(); virtual void activationFromTopPanel(); + virtual void startFontsBegin(); + virtual void startFontsEnd(); + [[nodiscard]] virtual std::shared_ptr createLinkHandler( EntityType type, const QString &text, diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index a73e169..318783b 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -6,8 +6,9 @@ // #include "ui/style/style_core_font.h" -#include "base/algorithm.h" #include "ui/ui_log.h" +#include "base/algorithm.h" +#include "ui/integration.h" #include #include @@ -137,6 +138,11 @@ void StartFonts() { style_InitFontsResource(); + const auto integrationExists = Ui::Integration::Exists(); + if (integrationExists) { + Ui::Integration::Instance().startFontsBegin(); + } + #ifndef DESKTOP_APP_USE_PACKAGED_FONTS bool areGood[FontTypesCount] = { false }; for (auto i = 0; i != FontTypesCount; ++i) { @@ -173,6 +179,10 @@ void StartFonts() { QFont::insertSubstitutions(name, list); } #endif // Q_OS_MAC + + if (integrationExists) { + Ui::Integration::Instance().startFontsEnd(); + } } QString GetPossibleEmptyOverride(const QString &familyName, int32 flags) {