Unicode: full Unicode Support (6 squashed commits) (#2541, #2538)

fix build for WideCharToMultiByte
[3181ff1e] Full Unicode Support
[6c9e73ac] Fix ImTextCountUtf8BytesFromChar and ImTextCharToUtf8, these APIs assume the input is an unicode code point, not UTF-16
[ba85665b] Add AddInputCharacterUTF16 for windows backend to handle WM_CHAR
[fafdcaf0] Use Windows API to convert UTF-16 for ImFileOpen
[dc7d5925] Use windows API to convert UTF-16 for clipboard
This commit is contained in:
Cloud Wu
2019-05-08 10:10:20 +08:00
committed by ocornut
parent 8c683de33f
commit 6d59653e82
5 changed files with 70 additions and 35 deletions

View File

@ -2550,8 +2550,7 @@ void ImFontGlyphRangesBuilder::AddText(const char* text, const char* text_end)
text += c_len;
if (c_len == 0)
break;
if (c <= IM_UNICODE_CODEPOINT_MAX)
AddChar((ImWchar)c);
AddChar((ImWchar)c);
}
}