This project only works on Windows 64-bit 😎👍
Download the latest release on the here
The exe is portable, simply double click it to run
All dependencies are included in the source
-
Make sure you have python and g++ installed
-
Use
python compiler.py --help
for more information
--run Run the executable
--clean Clean the build directory
--build Build the source
--release Builds for release
Standard Build
python compiler.py --build
Run after building
python compiler.py --build --run
Build for release (adds rc files, release flags, etc)
python compiler.py --build --release
You can find various tools under the tools directory. Most of them are for converting files into an appropriate header file format for embedding.
.\binary_to_compressed.exe font.ttf font > font.h
Make sure the final file is encoded as UTF-8 👍
ImGui::GetIO().Fonts->AddFontFromMemoryCompressedTTF(
font_compressed_data,
font_compressed_size, fontSize);
From the glfw documentation,
The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as packed sequential rows, starting from the top-left corner"
I figured since stbi_load
works seamlessly you can use the following binary to write image data to a .h file.
.\image_to_header.exe name.png output.h