diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index d423c75e4d8..c530524a38a 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -48,6 +48,7 @@ #include #include +#include #include #include #include @@ -140,6 +141,14 @@ void TextEditorPlugin::initialize() #endif Utils::Text::setCodeHighlighter(HighlighterHelper::highlightCode); + + if (Utils::HostOsInfo::isWindowsHost()) { + // warm up the fallback font cache on windows this reduces the startup time of the first + // editor by around 300 ms + Utils::asyncRun([font = QPlainTextEdit().font()]() { + QFontMetrics(font).horizontalAdvance(QChar(0x21B5)); + }); + } } void TextEditorPlugin::extensionsInitialized()