mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-07 17:01:21 +00:00
ImGui: Use base85-compressed font
instead of whatever other compression was used there. Fixes crash on Big Endian systems (#625)
This commit is contained in:
parent
81cab591da
commit
21f2e3a56a
3 changed files with 1780 additions and 4148 deletions
File diff suppressed because it is too large
Load diff
1778
neo/sys/proggyvector_font_base85.h
Normal file
1778
neo/sys/proggyvector_font_base85.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -79,7 +79,7 @@ extern ImGuiTextBuffer WriteImGuiStyleToCode( const ImGuiStyle& style, const ImG
|
|||
namespace D3 {
|
||||
namespace ImGuiHooks {
|
||||
|
||||
#include "proggyvector_font.h"
|
||||
#include "proggyvector_font_base85.h"
|
||||
|
||||
static SDL_Window* sdlWindow = NULL;
|
||||
ImGuiContext* imguiCtx = NULL;
|
||||
|
@ -365,7 +365,7 @@ void NewFrame()
|
|||
strcpy( fontCfg.Name, "ProggyVector" );
|
||||
float fontSize = 18.0f * GetScale();
|
||||
float fontSizeInt = roundf( fontSize ); // font sizes are supposed to be rounded to integers
|
||||
ImFont* font = io.Fonts->AddFontFromMemoryCompressedTTF(ProggyVector_compressed_data, ProggyVector_compressed_size, fontSizeInt, nullptr);
|
||||
io.Fonts->AddFontFromMemoryCompressedBase85TTF(ProggyVector_compressed_data_base85, fontSizeInt, &fontCfg);
|
||||
}
|
||||
|
||||
// Start the Dear ImGui frame
|
||||
|
|
Loading…
Reference in a new issue