6469b94304
Compiling the code as-is results in the following warning: -->8-- imgui_freetype.cpp:341:72: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct ImFontBuildSrcDataFT’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] 341 | memset(src_tmp_array.Data, 0, (size_t)src_tmp_array.size_in_bytes()); | ^ imgui_freetype.cpp:302:8: note: ‘struct ImFontBuildSrcDataFT’ declared here 302 | struct ImFontBuildSrcDataFT | ^~~~~~~~~~~~~~~~~~~~ --8<-- This is caused by presence of ImVector<> directly in ImFontBuildSrcDataFT data structure, as well as in the child ImBitVector. Since ImVector<> has a constructor, the compiler infers that initialization by memset is not valid. Such initialization is not a bug, however, as the default ImVector<> ctor just sets the structure data members to 0, which is exactly what the memset does. Casting the data structure address to void* pointer silences this warning. |
||
---|---|---|
.. | ||
cpp | ||
fonts | ||
freetype | ||
natvis | ||
single_file | ||
README.txt |
misc/cpp/ InputText() wrappers for C++ standard library (STL) type: std::string. This is also an example of how you may wrap your own similar types. misc/fonts/ Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. Suggested fonts and links. misc/freetype/ Font atlas builder/rasterizer using FreeType instead of stb_truetype. Benefit from better FreeType rasterization, in particular for small fonts. misc/natvis/ Natvis file to describe dear imgui types in the Visual Studio debugger. With this, types like ImVector<> will be displayed nicely in the debugger. You can include this file a Visual Studio project file, or install it in Visual Studio folder. misc/single_file/ Single-file header stub. We use this to validate compiling all *.cpp files in a same compilation unit. Users of that technique (also called "Unity builds") can generally provide this themselves, so we don't really recommend you use this in your projects.