mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 07:20:04 +00:00 
			
		
		
		
	Disabling unused font initialization
This commit is contained in:
		
							parent
							
								
									f4596a7964
								
							
						
					
					
						commit
						0d7b9ae9a7
					
				
					 2 changed files with 2 additions and 19 deletions
				
			
		|  | @ -2,7 +2,6 @@ | ||||||
| #include <scwx/qt/manager/font_manager.hpp> | #include <scwx/qt/manager/font_manager.hpp> | ||||||
| #include <scwx/qt/config/county_database.hpp> | #include <scwx/qt/config/county_database.hpp> | ||||||
| #include <scwx/qt/model/imgui_context_model.hpp> | #include <scwx/qt/model/imgui_context_model.hpp> | ||||||
| #include <scwx/qt/util/font.hpp> |  | ||||||
| #include <scwx/qt/util/texture_atlas.hpp> | #include <scwx/qt/util/texture_atlas.hpp> | ||||||
| #include <scwx/util/logger.hpp> | #include <scwx/util/logger.hpp> | ||||||
| 
 | 
 | ||||||
|  | @ -33,7 +32,6 @@ static const std::vector<std::pair<types::Font, std::string>> fontNames_ { | ||||||
|    {types::Font::Inconsolata_Regular, ":/res/fonts/Inconsolata-Regular.ttf"}}; |    {types::Font::Inconsolata_Regular, ":/res/fonts/Inconsolata-Regular.ttf"}}; | ||||||
| 
 | 
 | ||||||
| static std::unordered_map<types::Font, int> fontIds_ {}; | static std::unordered_map<types::Font, int> fontIds_ {}; | ||||||
| static std::unordered_map<types::Font, std::shared_ptr<util::Font>> fonts_ {}; |  | ||||||
| 
 | 
 | ||||||
| void Initialize() | void Initialize() | ||||||
| { | { | ||||||
|  | @ -55,16 +53,6 @@ int FontId(types::Font font) | ||||||
|    return -1; |    return -1; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<util::Font> Font(types::Font font) |  | ||||||
| { |  | ||||||
|    auto it = fonts_.find(font); |  | ||||||
|    if (it != fonts_.cend()) |  | ||||||
|    { |  | ||||||
|       return it->second; |  | ||||||
|    } |  | ||||||
|    return nullptr; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| std::shared_ptr<boost::gil::rgba8_image_t> | std::shared_ptr<boost::gil::rgba8_image_t> | ||||||
| LoadImageResource(const std::string& urlString) | LoadImageResource(const std::string& urlString) | ||||||
| { | { | ||||||
|  | @ -112,9 +100,6 @@ static void LoadFonts() | ||||||
|       fontIds_.emplace(fontName.first, fontId); |       fontIds_.emplace(fontName.first, fontId); | ||||||
| 
 | 
 | ||||||
|       fontManager.LoadApplicationFont(fontName.second); |       fontManager.LoadApplicationFont(fontName.second); | ||||||
| 
 |  | ||||||
|       auto font = util::Font::Create(fontName.second); |  | ||||||
|       fonts_.emplace(fontName.first, font); |  | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    fontManager.InitializeFonts(); |    fontManager.InitializeFonts(); | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include <scwx/qt/types/font_types.hpp> | #include <scwx/qt/types/font_types.hpp> | ||||||
| #include <scwx/qt/util/font.hpp> |  | ||||||
| 
 | 
 | ||||||
| #include <vector> | #include <vector> | ||||||
| 
 | 
 | ||||||
|  | @ -20,7 +19,6 @@ void Initialize(); | ||||||
| void Shutdown(); | void Shutdown(); | ||||||
| 
 | 
 | ||||||
| int FontId(types::Font font); | int FontId(types::Font font); | ||||||
| std::shared_ptr<util::Font> Font(types::Font font); |  | ||||||
| 
 | 
 | ||||||
| std::shared_ptr<boost::gil::rgba8_image_t> | std::shared_ptr<boost::gil::rgba8_image_t> | ||||||
| LoadImageResource(const std::string& urlString); | LoadImageResource(const std::string& urlString); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat