mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Fonts: Fixed crash if FontGlobalScale is zero. Correctly debug naming default font if not 13 px. Demo: Moved PopupRounding along with other rounding values. Metrics: Displaying indexes with idx to be correct / less misleading.
This commit is contained in:
		@@ -1592,8 +1592,10 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
 | 
			
		||||
        font_cfg.OversampleH = font_cfg.OversampleV = 1;
 | 
			
		||||
        font_cfg.PixelSnapH = true;
 | 
			
		||||
    }
 | 
			
		||||
    if (font_cfg.Name[0] == '\0') strcpy(font_cfg.Name, "ProggyClean.ttf, 13px");
 | 
			
		||||
    if (font_cfg.SizePixels <= 0.0f) font_cfg.SizePixels = 13.0f;
 | 
			
		||||
    if (font_cfg.SizePixels <= 0.0f) 
 | 
			
		||||
        font_cfg.SizePixels = 13.0f * 1.0f;
 | 
			
		||||
    if (font_cfg.Name[0] == '\0') 
 | 
			
		||||
        ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "ProggyClean.ttf, %dpx", (int)font_cfg.SizePixels);
 | 
			
		||||
 | 
			
		||||
    const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
 | 
			
		||||
    const ImWchar* glyph_ranges = font_cfg.GlyphRanges != NULL ? font_cfg.GlyphRanges : GetGlyphRangesDefault();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user