The C file is small enough to read (over a few minutes.) I got to about line 5 and realized: I’ve never seen quite that technique for embedding a font via an autogenerated header before. I’m more used to Windows resources; this seems to generate a byte array in CMake code. I’m somewhere between horrified and impressed, in that I feel we’ve finally discovered a cross platform binary resource embedding solution.
Here's the build script that uses: https://github.com/ghostty-org/ghostling/blob/main/bin2heade... I ran it against a 1x1 pixel GIF: cmake -DINPUT=pixel.gif -DOUTPUT=pixel.h -DARRAY_NAME=pixel_gif -P bin2header.cmake And got this: // Auto-generated from /private/tmp/exp/pixel.gif — do not edit. static const unsigned char pixel_gif[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0xf…
https://cmake.org/cmake/help/v4.3/manual/cmake.1.html#cmdopt...
...it will probably take a decade or two until Debian-based Linux distros will get cmake 4.3 though ;)