mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Fonts: Fixed crash when merging fonts and the first font has no valid glyph. (#6446)
This commit is contained in:
		@@ -69,6 +69,7 @@ Other changes:
 | 
				
			|||||||
  erroneously initializing default nav layer to menu layer.
 | 
					  erroneously initializing default nav layer to menu layer.
 | 
				
			||||||
- Menus: Fixed an issue when opening a menu hierarchy in a given menu-bar would allow
 | 
					- Menus: Fixed an issue when opening a menu hierarchy in a given menu-bar would allow
 | 
				
			||||||
  opening another via simple hovering. (#3496, #4797)
 | 
					  opening another via simple hovering. (#3496, #4797)
 | 
				
			||||||
 | 
					- Fonts: Fixed crash when merging fonts and the first font has no valid glyph. (#6446) [@JaedanC]
 | 
				
			||||||
- Misc: Added ImVec2 unary minus operator. (#6368) [@Koostosh]
 | 
					- Misc: Added ImVec2 unary minus operator. (#6368) [@Koostosh]
 | 
				
			||||||
- Debug Tools: Debug Log: Fixed not parsing 0xXXXXXXXX values for geo-locating on mouse
 | 
					- Debug Tools: Debug Log: Fixed not parsing 0xXXXXXXXX values for geo-locating on mouse
 | 
				
			||||||
  hover hover when the identifier is at the end of the line. (#5855)
 | 
					  hover hover when the identifier is at the end of the line. (#5855)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2553,13 +2553,10 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
 | 
				
			|||||||
    // 9. Setup ImFont and glyphs for runtime
 | 
					    // 9. Setup ImFont and glyphs for runtime
 | 
				
			||||||
    for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
 | 
					    for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        ImFontBuildSrcData& src_tmp = src_tmp_array[src_i];
 | 
					 | 
				
			||||||
        if (src_tmp.GlyphsCount == 0)
 | 
					 | 
				
			||||||
            continue;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // When merging fonts with MergeMode=true:
 | 
					        // When merging fonts with MergeMode=true:
 | 
				
			||||||
        // - We can have multiple input fonts writing into a same destination font.
 | 
					        // - We can have multiple input fonts writing into a same destination font.
 | 
				
			||||||
        // - dst_font->ConfigData is != from cfg which is our source configuration.
 | 
					        // - dst_font->ConfigData is != from cfg which is our source configuration.
 | 
				
			||||||
 | 
					        ImFontBuildSrcData& src_tmp = src_tmp_array[src_i];
 | 
				
			||||||
        ImFontConfig& cfg = atlas->ConfigData[src_i];
 | 
					        ImFontConfig& cfg = atlas->ConfigData[src_i];
 | 
				
			||||||
        ImFont* dst_font = cfg.DstFont;
 | 
					        ImFont* dst_font = cfg.DstFont;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user