mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:50:06 +00:00 
			
		
		
		
	Add Roboto Flex as default attribution font
This commit is contained in:
		
							parent
							
								
									5efeeb1080
								
							
						
					
					
						commit
						6b00c55bac
					
				
					 8 changed files with 16 additions and 6 deletions
				
			
		|  | @ -28,7 +28,8 @@ static void LoadTextures(); | |||
| static const std::vector<std::pair<types::Font, std::string>> fontNames_ { | ||||
|    {types::Font::din1451alt, ":/res/fonts/din1451alt.ttf"}, | ||||
|    {types::Font::din1451alt_g, ":/res/fonts/din1451alt_g.ttf"}, | ||||
|    {types::Font::Inconsolata_Regular, ":/res/fonts/Inconsolata-Regular.ttf"}}; | ||||
|    {types::Font::Inconsolata_Regular, ":/res/fonts/Inconsolata-Regular.ttf"}, | ||||
|    {types::Font::RobotoFlex_Regular, ":/res/fonts/RobotoFlex-Regular.ttf"}}; | ||||
| 
 | ||||
| void Initialize() | ||||
| { | ||||
|  |  | |||
|  | @ -15,19 +15,23 @@ static const std::string logPrefix_ = "scwx::qt::settings::text_settings"; | |||
| static const std::string kAlteDIN1451Mittelscrhift_ { | ||||
|    "Alte DIN 1451 Mittelschrift"}; | ||||
| static const std::string kInconsolata_ {"Inconsolata"}; | ||||
| static const std::string kRobotoFlex_ {"Roboto Flex"}; | ||||
| 
 | ||||
| static const std::string kRegular_ {"Regular"}; | ||||
| 
 | ||||
| static const std::unordered_map<types::FontCategory, std::string> | ||||
|    kDefaultFontFamily_ { | ||||
|       {types::FontCategory::Default, kAlteDIN1451Mittelscrhift_}, | ||||
|       {types::FontCategory::Tooltip, kInconsolata_}}; | ||||
|       {types::FontCategory::Tooltip, kInconsolata_}, | ||||
|       {types::FontCategory::Attribution, kRobotoFlex_}}; | ||||
| static const std::unordered_map<types::FontCategory, std::string> | ||||
|    kDefaultFontStyle_ {{types::FontCategory::Default, kRegular_}, | ||||
|                        {types::FontCategory::Tooltip, kRegular_}}; | ||||
|                        {types::FontCategory::Tooltip, kRegular_}, | ||||
|                        {types::FontCategory::Attribution, kRegular_}}; | ||||
| static const std::unordered_map<types::FontCategory, double> | ||||
|    kDefaultFontPointSize_ {{types::FontCategory::Default, 12.0}, | ||||
|                            {types::FontCategory::Tooltip, 10.5}}; | ||||
|                            {types::FontCategory::Tooltip, 10.5}, | ||||
|                            {types::FontCategory::Attribution, 9.0}}; | ||||
| 
 | ||||
| class TextSettings::Impl | ||||
| { | ||||
|  |  | |||
|  | @ -37,7 +37,8 @@ enum class Font | |||
| { | ||||
|    din1451alt, | ||||
|    din1451alt_g, | ||||
|    Inconsolata_Regular | ||||
|    Inconsolata_Regular, | ||||
|    RobotoFlex_Regular | ||||
| }; | ||||
| 
 | ||||
| } // namespace types
 | ||||
|  |  | |||
|  | @ -14,6 +14,7 @@ namespace types | |||
| static const std::unordered_map<FontCategory, std::string> fontCategoryName_ { | ||||
|    {FontCategory::Default, "Default"}, | ||||
|    {FontCategory::Tooltip, "Tooltip"}, | ||||
|    {FontCategory::Attribution, "Attribution"}, | ||||
|    {FontCategory::Unknown, "?"}}; | ||||
| 
 | ||||
| static const std::unordered_map<TooltipMethod, std::string> tooltipMethodName_ { | ||||
|  |  | |||
|  | @ -15,10 +15,11 @@ enum class FontCategory | |||
| { | ||||
|    Default, | ||||
|    Tooltip, | ||||
|    Attribution, | ||||
|    Unknown | ||||
| }; | ||||
| typedef scwx::util:: | ||||
|    Iterator<FontCategory, FontCategory::Default, FontCategory::Tooltip> | ||||
|    Iterator<FontCategory, FontCategory::Default, FontCategory::Attribution> | ||||
|       FontCategoryIterator; | ||||
| 
 | ||||
| enum class TooltipMethod | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat