I know how to set font for GTK+3 programs from the command-line, namely by editing the right-hand side (RHS) of ~/.config/gtk-3.0/settings.ini's font line:
gtk-font-name=Font Awesome 5 Free Regular
likewise to set the GTK+ 3 font I'd edit the RHS of:
gtk-theme-name=Qogir-win-light
(these lines are taken from my settings.ini file) but I do not know how to do so for GTK+ 2 programs.