Skip to content

Commit

Permalink
embedded profont
Browse files Browse the repository at this point in the history
  • Loading branch information
BoyC committed Apr 6, 2024
1 parent 129f0f0 commit 3a4bc3e
Show file tree
Hide file tree
Showing 3 changed files with 225 additions and 1 deletion.
Binary file removed ProfontPixelated.ttf
Binary file not shown.
4 changes: 3 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <tchar.h>
#include "kkp.h"
#include <unordered_map>
#include "profont.h"

static ID3D11Device* g_pd3dDevice = nullptr;
static ID3D11DeviceContext* g_pd3dDeviceContext = nullptr;
Expand Down Expand Up @@ -752,7 +753,8 @@ INT WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
ImGui_ImplWin32_Init(hwnd);
ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext);

io.Fonts->AddFontFromFileTTF("ProfontPixelated.ttf", 11.0f);
auto profont = ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(profont_compressed_data, profont_compressed_size, 11.0f);
//io.Fonts->AddFontFromFileTTF("ProfontPixelated.ttf", 11.0f);

ImVec4 clear_color = ImVec4(0, 0, 0, 1.00f);

Expand Down
Loading

0 comments on commit 3a4bc3e

Please sign in to comment.