Fonts: Prefer using U+FFFD character for fallback instead of '?'. Use U+FF0E dot character to construct an ellipsis if U+002E '.' is not available. (#4269)

This commit is contained in:
ocornut
2021-06-25 15:44:14 +02:00
parent 8ced41570e
commit 38165f420f
4 changed files with 39 additions and 22 deletions

View File

@ -2709,7 +2709,8 @@ struct ImFont
const ImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData
short ConfigDataCount; // 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
ImWchar FallbackChar; // 2 // in // = '?' // Replacement character if a glyph isn't found. Only set via SetFallbackChar()
ImWchar EllipsisChar; // 2 // out // = -1 // Character used for ellipsis rendering.
ImWchar EllipsisChar; // 2 // out // = '...' // Character used for ellipsis rendering.
ImWchar DotChar; // 2 // out // = '.' // Dot character used for fallback ellipsis rendering.
bool DirtyLookupTables; // 1 // out //
float Scale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
float Ascent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]