There's a memory leak bug in your code. If the term_arr alloc fails, you don't fclose the file. Also, in getrgb, you don't check the return of malloc so they could be NULL pointers
Pointers are so easy to mess up. Have you heard of asan? It's really useful for finding memory bugs.
Something else I noticed - is filepath guaranteed to be NULL terminated? Since it's not a string literal, it might not be. You should make sure that it is, otherwise you'll have a buffer overflow bug too.
There's a memory leak bug in your code. If the term_arr alloc fails, you don't fclose the file. Also, in getrgb, you don't check the return of malloc so they could be NULL pointers
Dina. There's a similar font called Terminus but I couldn't get it to work
wm: bspwm
status bar: polybar
terminal: alacritty
shell: bash
editor: vim
file manager: fff
font: dina
Pointers are so easy to mess up. Have you heard of asan? It's really useful for finding memory bugs. Something else I noticed - is filepath guaranteed to be NULL terminated? Since it's not a string literal, it might not be. You should make sure that it is, otherwise you'll have a buffer overflow bug too.
What's the font?