Hi, I'm planning to use Neuron for some teaching and want to make the fonts in the GUI larger. It's been a while since I used the GUI and I can't find the configuration files. I've found some older forum posts that appear to be redundant. I've also played around with ivoc_style(). This appears to execute but doesn't do anything to the GUI. Any suggestions would be appreciated.
I'm running Neuron 7.7 and Python 3.6.9 under Ubuntu 18.04.
Configure fonts, etc in GUI
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Configure fonts, etc in GUI
Under Windows it's easy. Assuming that an instance of the PWManager class exists (it will exist if you started NEURON by executing nrngui, or if your code has executed a
load_file("nrngui.hoc")
statement), then an instance of the PWManager class will exist and you can use its scale() function to change the size of all of NEURON's GUI windows. Try this:
objref pwm
pwm = PWManager[0]
then execute
pwm.scale(1)
and if that isn't big enough, try a numerical argument < 1 (e.g. 0.8 or even smaller). Sorry, this doesn't work under MacOS or Linux.
Under Linux you could try changing the font sizes specified in nrn/share/nrn/lib/nrn.defaults
Look for these three lines
*font: *helvetica-medium-r-normal*--14*
*MenuBar*font: *-helvetica-bold-o-normal--14*
*MenuItem*font: *-helvetica-bold-o-normal--14*
The 14 "should" control the size of the font displayed. Try different values and see if that works. My experience doing this under CentOS was not great--in the end I simply had to decrease display resolution, or reboot to MSWin. My choice was to decrease display resolution because that also made the text in NEURON's xterm bigger.
load_file("nrngui.hoc")
statement), then an instance of the PWManager class will exist and you can use its scale() function to change the size of all of NEURON's GUI windows. Try this:
objref pwm
pwm = PWManager[0]
then execute
pwm.scale(1)
and if that isn't big enough, try a numerical argument < 1 (e.g. 0.8 or even smaller). Sorry, this doesn't work under MacOS or Linux.
Under Linux you could try changing the font sizes specified in nrn/share/nrn/lib/nrn.defaults
Look for these three lines
*font: *helvetica-medium-r-normal*--14*
*MenuBar*font: *-helvetica-bold-o-normal--14*
*MenuItem*font: *-helvetica-bold-o-normal--14*
The 14 "should" control the size of the font displayed. Try different values and see if that works. My experience doing this under CentOS was not great--in the end I simply had to decrease display resolution, or reboot to MSWin. My choice was to decrease display resolution because that also made the text in NEURON's xterm bigger.
Re: Configure fonts, etc in GUI
Hi Ted, thanks for the quick answer. I can't find a file in my installation called nrn.defaults. I'm using a version that's installed via pip3 and called from the Python command line. I'll see if I can figure it out from how it sets up the GUI...