Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
473 stars 101 forks source link

loadFontFromMemory fontChars missing support for NULL #47

Closed ZanovelloAlberto closed 12 months ago

ZanovelloAlberto commented 12 months ago

LoadFontFromMemory poor bindings

Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); 
// Load font from memory buffer, fileType refers to extension: i.e. '.ttf'

the parameter named fontChars int* is supported be null by raylib but not by our bindings, in serveral raylib example this varaible is set to 0 or NULL (is the same) and the behaviur when you do that is that it take all char from the first one. in our bindings the parameter is a []i32 and i cant figure it out a workaround to set 0 or null

PS: the next paramenter make no sense if we send a slice in the first one, the second one must be the lenght of the slice