You have to use a gtk-theming tool to change the font used by GTK. What is the wxgtk version you're using? Does it use gtk2 or gtk3?
I use the Awaita Theme. Changing the font size only affects the Menu Bar. (File, Edit, View, ...) and the drop down menus.
The wxgtk version used is gtk3.
GENTOO:
x11-libs/wxGTK
GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit
https://wxwidgets.org/Installed versions:
Slot 3.0: 3.0.4-r2 (used by FileZilla)
Slot 3.0-gtk3: 3.0.4-r302 (used by Code::Blocks)
Available versions for amd64:
Slot 3.0: 3.0.4-r2
Slot 3.0-gtk3: 3.0.4-r302
Which is the currently recommend Linux Desktop for use with Code::Blocks 17.2?
Which Linux OS and Desktop do you use for testing?