Hello! I’ve been working on a DearImGUI project of mine since about 2017, based off of the OpenGL3 version of the example code. Only this year I’ve been testing my program in a release format, but that appears to reveal a serious problem.
In my pursuit to improve visibility, I have decided to use Inconsolata as my font of choice, as it was recommended in the Readme.
I have added the font in Main.cpp by entering the following, based on the loading font tips above it, and before the rest of the main calls NewFrame():
“io.Fonts->AddFontFromFileTTF(”…/…/misc/fonts/Inconsolata-Regular.ttf", 17.2f);"
(I also disabled the loading of the Default font, as that would prevent Inconsolata from showing up otherwise. I have not used Font Push or Pop.)
While this font change functions perfectly fine in the debug version of the project in Visual Studio, when compiling the project for release, and attempting to launch the executable, it spits out an error, specifically, the following:
“Assertion Failed: 0 file …\imgui_draw.cpp, line 1549.”
On further study of that error location it appears that this is a NULL error in the function for AddFontFromFileTTF, the same function in which I had attempted to import the font from.
This error occurs even if I enable the Default Font, and attempt to add the Inconsolata font at the same time.
My latest release build, when disabling the font, otherwise functions.
I understand, as shown in the readme regarding fonts, that there is some sort of process using binary_to_compressed_c.cpp which adds a specified font to the application’s library, but I am unsure how to use the function properly, let alone run it using Windows PowerShell or a regional equivalent on my Windows Machine. I’m overall more familiar compiling code on a Linux VM with GCC than creating some sort of exclusive VS project that runs that .cpp file.
I had seen that the readme also referenced a precompiled version of binary_to_compressed_c.cpp within an executable somewhere in the repository, but I have not found out where that might be in the first place. That would seem to be my best option overall.
Any help would be appreciated, thanks!