mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 09:40:04 +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
				
			
		|  | @ -67,6 +67,7 @@ Supercell Wx uses assets from the following sources: | ||||||
| | [Font Awesome Free](https://fontawesome.com/) | CC BY 4.0 License | | | [Font Awesome Free](https://fontawesome.com/) | CC BY 4.0 License | | ||||||
| | [Inconsolata](https://fonts.google.com/specimen/Inconsolata) | SIL Open Font License | | | [Inconsolata](https://fonts.google.com/specimen/Inconsolata) | SIL Open Font License | | ||||||
| | [NOAA's Weather and Climate Toolkit](https://www.ncdc.noaa.gov/wct/) | Public Domain | Default Color Tables | | | [NOAA's Weather and Climate Toolkit](https://www.ncdc.noaa.gov/wct/) | Public Domain | Default Color Tables | | ||||||
|  | | [Roboto Flex](https://fonts.google.com/specimen/Roboto+Flex) | SIL Open Font License | | ||||||
| | [Supercell thunderstorm with dramatic clouds](https://www.shutterstock.com/image-photo/supercell-thunderstorm-dramatic-clouds-1354353521) | Shutterstock Standard License | Photo by John Sirlin | | [Supercell thunderstorm with dramatic clouds](https://www.shutterstock.com/image-photo/supercell-thunderstorm-dramatic-clouds-1354353521) | Shutterstock Standard License | Photo by John Sirlin | ||||||
| 
 | 
 | ||||||
| Services | Services | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								scwx-qt/res/fonts/RobotoFlex-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								scwx-qt/res/fonts/RobotoFlex-Regular.ttf
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -18,6 +18,7 @@ | ||||||
|         <file>res/fonts/din1451alt.ttf</file> |         <file>res/fonts/din1451alt.ttf</file> | ||||||
|         <file>res/fonts/din1451alt_g.ttf</file> |         <file>res/fonts/din1451alt_g.ttf</file> | ||||||
|         <file>res/fonts/Inconsolata-Regular.ttf</file> |         <file>res/fonts/Inconsolata-Regular.ttf</file> | ||||||
|  |         <file>res/fonts/RobotoFlex-Regular.ttf</file> | ||||||
|         <file>res/icons/scwx-64.png</file> |         <file>res/icons/scwx-64.png</file> | ||||||
|         <file>res/icons/scwx-256.ico</file> |         <file>res/icons/scwx-256.ico</file> | ||||||
|         <file>res/icons/scwx-256.png</file> |         <file>res/icons/scwx-256.png</file> | ||||||
|  |  | ||||||
|  | @ -28,7 +28,8 @@ static void LoadTextures(); | ||||||
| static const std::vector<std::pair<types::Font, std::string>> fontNames_ { | static const std::vector<std::pair<types::Font, std::string>> fontNames_ { | ||||||
|    {types::Font::din1451alt, ":/res/fonts/din1451alt.ttf"}, |    {types::Font::din1451alt, ":/res/fonts/din1451alt.ttf"}, | ||||||
|    {types::Font::din1451alt_g, ":/res/fonts/din1451alt_g.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() | void Initialize() | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -15,19 +15,23 @@ static const std::string logPrefix_ = "scwx::qt::settings::text_settings"; | ||||||
| static const std::string kAlteDIN1451Mittelscrhift_ { | static const std::string kAlteDIN1451Mittelscrhift_ { | ||||||
|    "Alte DIN 1451 Mittelschrift"}; |    "Alte DIN 1451 Mittelschrift"}; | ||||||
| static const std::string kInconsolata_ {"Inconsolata"}; | static const std::string kInconsolata_ {"Inconsolata"}; | ||||||
|  | static const std::string kRobotoFlex_ {"Roboto Flex"}; | ||||||
| 
 | 
 | ||||||
| static const std::string kRegular_ {"Regular"}; | static const std::string kRegular_ {"Regular"}; | ||||||
| 
 | 
 | ||||||
| static const std::unordered_map<types::FontCategory, std::string> | static const std::unordered_map<types::FontCategory, std::string> | ||||||
|    kDefaultFontFamily_ { |    kDefaultFontFamily_ { | ||||||
|       {types::FontCategory::Default, kAlteDIN1451Mittelscrhift_}, |       {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> | static const std::unordered_map<types::FontCategory, std::string> | ||||||
|    kDefaultFontStyle_ {{types::FontCategory::Default, kRegular_}, |    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> | static const std::unordered_map<types::FontCategory, double> | ||||||
|    kDefaultFontPointSize_ {{types::FontCategory::Default, 12.0}, |    kDefaultFontPointSize_ {{types::FontCategory::Default, 12.0}, | ||||||
|                            {types::FontCategory::Tooltip, 10.5}}; |                            {types::FontCategory::Tooltip, 10.5}, | ||||||
|  |                            {types::FontCategory::Attribution, 9.0}}; | ||||||
| 
 | 
 | ||||||
| class TextSettings::Impl | class TextSettings::Impl | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -37,7 +37,8 @@ enum class Font | ||||||
| { | { | ||||||
|    din1451alt, |    din1451alt, | ||||||
|    din1451alt_g, |    din1451alt_g, | ||||||
|    Inconsolata_Regular |    Inconsolata_Regular, | ||||||
|  |    RobotoFlex_Regular | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| } // namespace types
 | } // namespace types
 | ||||||
|  |  | ||||||
|  | @ -14,6 +14,7 @@ namespace types | ||||||
| static const std::unordered_map<FontCategory, std::string> fontCategoryName_ { | static const std::unordered_map<FontCategory, std::string> fontCategoryName_ { | ||||||
|    {FontCategory::Default, "Default"}, |    {FontCategory::Default, "Default"}, | ||||||
|    {FontCategory::Tooltip, "Tooltip"}, |    {FontCategory::Tooltip, "Tooltip"}, | ||||||
|  |    {FontCategory::Attribution, "Attribution"}, | ||||||
|    {FontCategory::Unknown, "?"}}; |    {FontCategory::Unknown, "?"}}; | ||||||
| 
 | 
 | ||||||
| static const std::unordered_map<TooltipMethod, std::string> tooltipMethodName_ { | static const std::unordered_map<TooltipMethod, std::string> tooltipMethodName_ { | ||||||
|  |  | ||||||
|  | @ -15,10 +15,11 @@ enum class FontCategory | ||||||
| { | { | ||||||
|    Default, |    Default, | ||||||
|    Tooltip, |    Tooltip, | ||||||
|  |    Attribution, | ||||||
|    Unknown |    Unknown | ||||||
| }; | }; | ||||||
| typedef scwx::util:: | typedef scwx::util:: | ||||||
|    Iterator<FontCategory, FontCategory::Default, FontCategory::Tooltip> |    Iterator<FontCategory, FontCategory::Default, FontCategory::Attribution> | ||||||
|       FontCategoryIterator; |       FontCategoryIterator; | ||||||
| 
 | 
 | ||||||
| enum class TooltipMethod | enum class TooltipMethod | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat