InputText: Fixed password fields displaying ASCII spaces as blanks. Fixed non-ASCII space occasionally creating unnecessary empty polygons. (#2149, #515)

This commit is contained in:
omar
2020-02-11 18:53:57 +01:00
parent ccaec1a270
commit d284a6cffc
4 changed files with 89 additions and 73 deletions

View File

@ -2068,9 +2068,12 @@ struct ImFontConfig
IMGUI_API ImFontConfig();
};
// Hold rendering data for one glyph.
// (Note: some language parsers may fail to convert the 31+1 bitfield members, in this case maybe drop store a single u32 or we can rework this)
struct ImFontGlyph
{
ImWchar Codepoint; // 0x0000..0xFFFF
unsigned int Codepoint : 31; // 0x0000..0xFFFF
unsigned int Visible : 1; // Flag to allow early out when rendering
float AdvanceX; // Distance to next character (= data from font + ImFontConfig::GlyphExtraSpacing.x baked in)
float X0, Y0, X1, Y1; // Glyph corners
float U0, V0, U1, V1; // Texture coordinates
@ -2265,6 +2268,7 @@ struct ImFont
IMGUI_API void GrowIndex(int new_size);
IMGUI_API void AddGlyph(ImWchar c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x);
IMGUI_API void AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst = true); // Makes 'dst' character/glyph points to 'src' character/glyph. Currently needs to be called AFTER fonts have been built.
IMGUI_API void SetGlyphVisible(ImWchar c, bool visible);
IMGUI_API void SetFallbackChar(ImWchar c);
};