|
@@ -19,13 +19,13 @@
|
|
|
|
|
|
#include <stdio.h> // vsnprintf, sscanf, printf
|
|
|
#if !defined(alloca)
|
|
|
-#ifdef _WIN32
|
|
|
+#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__)
|
|
|
+#include <alloca.h> // alloca (glibc uses <alloca.h>. Note that Cygwin may have _WIN32 defined, so the order matters here)
|
|
|
+#elif defined(_WIN32)
|
|
|
#include <malloc.h> // alloca
|
|
|
#if !defined(alloca)
|
|
|
#define alloca _alloca // for clang with MS Codegen
|
|
|
#endif
|
|
|
-#elif defined(__GLIBC__) || defined(__sun)
|
|
|
-#include <alloca.h> // alloca
|
|
|
#else
|
|
|
#include <stdlib.h> // alloca
|
|
|
#endif
|
|
@@ -1340,50 +1340,51 @@ ImFontConfig::ImFontConfig()
|
|
|
|
|
|
// A work of art lies ahead! (. = white layer, X = black layer, others are blank)
|
|
|
// The white texels on the top left are the ones we'll use everywhere in ImGui to render filled shapes.
|
|
|
-const int FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 90;
|
|
|
+const int FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 108;
|
|
|
const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27;
|
|
|
const unsigned int FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000;
|
|
|
static const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] =
|
|
|
{
|
|
|
- "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX"
|
|
|
- "..- -X.....X- X.X - X.X -X.....X - X.....X"
|
|
|
- "--- -XXX.XXX- X...X - X...X -X....X - X....X"
|
|
|
- "X - X.X - X.....X - X.....X -X...X - X...X"
|
|
|
- "XX - X.X -X.......X- X.......X -X..X.X - X.X..X"
|
|
|
- "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X"
|
|
|
- "X..X - X.X - X.X - X.X -XX X.X - X.X XX"
|
|
|
- "X...X - X.X - X.X - XX X.X XX - X.X - X.X "
|
|
|
- "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X "
|
|
|
- "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X "
|
|
|
- "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X "
|
|
|
- "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X "
|
|
|
- "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X "
|
|
|
- "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X "
|
|
|
- "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X "
|
|
|
- "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X "
|
|
|
- "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX "
|
|
|
- "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------"
|
|
|
- "X.X X..X - -X.......X- X.......X - XX XX - "
|
|
|
- "XX X..X - - X.....X - X.....X - X.X X.X - "
|
|
|
- " X..X - X...X - X...X - X..X X..X - "
|
|
|
- " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - "
|
|
|
- "------------ - X - X -X.....................X- "
|
|
|
- " ----------------------------------- X...XXXXXXXXXXXXX...X - "
|
|
|
- " - X..X X..X - "
|
|
|
- " - X.X X.X - "
|
|
|
- " - XX XX - "
|
|
|
+ "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- XX "
|
|
|
+ "..- -X.....X- X.X - X.X -X.....X - X.....X- X..X "
|
|
|
+ "--- -XXX.XXX- X...X - X...X -X....X - X....X- X..X "
|
|
|
+ "X - X.X - X.....X - X.....X -X...X - X...X- X..X "
|
|
|
+ "XX - X.X -X.......X- X.......X -X..X.X - X.X..X- X..X "
|
|
|
+ "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- X..XXX "
|
|
|
+ "X..X - X.X - X.X - X.X -XX X.X - X.X XX- X..X..XXX "
|
|
|
+ "X...X - X.X - X.X - XX X.X XX - X.X - X.X - X..X..X..XX "
|
|
|
+ "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - X..X..X..X.X "
|
|
|
+ "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -XXX X..X..X..X..X"
|
|
|
+ "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -X..XX........X..X"
|
|
|
+ "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -X...X...........X"
|
|
|
+ "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - X..............X"
|
|
|
+ "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - X.............X"
|
|
|
+ "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - X.............X"
|
|
|
+ "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - X............X"
|
|
|
+ "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - X...........X "
|
|
|
+ "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- X..........X "
|
|
|
+ "X.X X..X - -X.......X- X.......X - XX XX - - X..........X "
|
|
|
+ "XX X..X - - X.....X - X.....X - X.X X.X - - X........X "
|
|
|
+ " X..X - X...X - X...X - X..X X..X - - X........X "
|
|
|
+ " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - - XXXXXXXXXX "
|
|
|
+ "------------ - X - X -X.....................X- ------------------"
|
|
|
+ " ----------------------------------- X...XXXXXXXXXXXXX...X - "
|
|
|
+ " - X..X X..X - "
|
|
|
+ " - X.X X.X - "
|
|
|
+ " - XX XX - "
|
|
|
};
|
|
|
|
|
|
static const ImVec2 FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[ImGuiMouseCursor_COUNT][3] =
|
|
|
{
|
|
|
// Pos ........ Size ......... Offset ......
|
|
|
- { ImVec2(0,3), ImVec2(12,19), ImVec2( 0, 0) }, // ImGuiMouseCursor_Arrow
|
|
|
- { ImVec2(13,0), ImVec2(7,16), ImVec2( 4, 8) }, // ImGuiMouseCursor_TextInput
|
|
|
+ { ImVec2( 0,3), ImVec2(12,19), ImVec2( 0, 0) }, // ImGuiMouseCursor_Arrow
|
|
|
+ { ImVec2(13,0), ImVec2( 7,16), ImVec2( 1, 8) }, // ImGuiMouseCursor_TextInput
|
|
|
{ ImVec2(31,0), ImVec2(23,23), ImVec2(11,11) }, // ImGuiMouseCursor_ResizeAll
|
|
|
- { ImVec2(21,0), ImVec2( 9,23), ImVec2( 5,11) }, // ImGuiMouseCursor_ResizeNS
|
|
|
- { ImVec2(55,18),ImVec2(23, 9), ImVec2(11, 5) }, // ImGuiMouseCursor_ResizeEW
|
|
|
- { ImVec2(73,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNESW
|
|
|
- { ImVec2(55,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNWSE
|
|
|
+ { ImVec2(21,0), ImVec2( 9,23), ImVec2( 4,11) }, // ImGuiMouseCursor_ResizeNS
|
|
|
+ { ImVec2(55,18),ImVec2(23, 9), ImVec2(11, 4) }, // ImGuiMouseCursor_ResizeEW
|
|
|
+ { ImVec2(73,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNESW
|
|
|
+ { ImVec2(55,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNWSE
|
|
|
+ { ImVec2(91,0), ImVec2(17,22), ImVec2( 5, 0) }, // ImGuiMouseCursor_Hand
|
|
|
};
|
|
|
|
|
|
ImFontAtlas::ImFontAtlas()
|