diff --git a/swGUI/Core/System/GUISystem.cpp b/swGUI/Core/System/GUISystem.cpp index 4de6f5c1..c10f229e 100644 --- a/swGUI/Core/System/GUISystem.cpp +++ b/swGUI/Core/System/GUISystem.cpp @@ -19,6 +19,7 @@ #include "swGraphicAPI/Loaders/SoilTextureLoader/SoilTextureLoader.h" #include "swGraphicAPI/Assets/TextAsset/Loader/FontLoader.h" #include "swGraphicAPI/Assets/TextAsset/Loader/FontAssetCreator.h" +#include "swGraphicAPI/Assets/TextAsset/Loader/FontPicker.h" #include "swInputLibrary/InputCore/Debugging/EventCapture.h" @@ -357,10 +358,13 @@ ReturnResult GUISystem::ResourceManagerInitImpl ( ResourceManager* resourceMan { m_pathsManager = m_resourceManager->GetPathsManager(); + FontPicker picker; + picker.RegisterSearchPath( "$(SystemFonts)" ); + // GUI needs Textures loader to work. ///< @todo What to do if user adds his own Texture loader? We must avoid conflicts between them. resourceManager->RegisterLoader( std::make_shared< SoilTextureLoader >() ); - resourceManager->RegisterLoader( std::make_shared< FreeTypeLoader >() ); + resourceManager->RegisterLoader( std::make_shared< FreeTypeLoader >( std::move( picker ) ) ); resourceManager->RegisterAssetCreator( FontCreator::CreateCreator() ); return Success::True;