Summaries New Bug


Bug ID 42
category
subject Re: hard to read fonts in view for Linux
submitted by Robert J. Mallis
time Wed Aug 22 14:08:47 EDT 2001
software version
operating system
priority
Resolved In
comments Hello again viewers,

In case anyone has had a similar problem..

My problem is the fonts which you set up for labeling axis and peaks in the
File:Prefs:Fonts dialog.

In nmrview w/ Berk dist or nmrview in various Linux RedHat packages
with KDE or with Gnome/enlightenment Gnome/Sawfish, this box has no effect in my
hands. I am not sure why it is a problem, but I suspect that there are variable
definition conflicts. Or I could be missing something very elementary...

At any rate, I wrote a little workaround for my "problem": 
############
# Fontfix.tcl Version 1
# Robert J. Mallis
# 082201

# for every window that is open
# change the font as indicated for
# the coordinates, axis labels, and
# peak labels, respectively

global Nv_coordfont
global Nv_labelfont
global Nv_peakfont

set Nv_coordfont {Helvetica 8 normal}
set Nv_labelfont {Times 9 bold}
set Nv_peakfont {Times 9 bold}

puts "Coordinate font (Nv_coordfont) is $Nv_coordfont"
puts "Axis font (Nv_labelfont) is $Nv_labelfont"
puts "Peak label font (Nv_peakfont) is $Nv_peakfont"

proc Fontfix {} {
global Nv_labelfont
global Nv_coordfont
global Nv_peakfont
foreach i [win open] {
$i config -coordFont $Nv_coordfont
$i config -labelFont $Nv_labelfont
$i config -peakFont $Nv_peakfont
}
# print the selected fonts FYI

puts "Coordinate font is $Nv_coordfont"
puts "Axis font is $Nv_labelfont"
puts "Peak label font is $Nv_peakfont"
}
########

Just source it once and then type "Fontfix" whenever your windows look ugly.
You will have to access it several times since the original Preferences
(whereever they may be) override this hack. I set the "f" key to this routine
using keybind in my startup script (which I also use to initialize the script).
The variables are all globalized so you can change them in the console window to
whatever suits you best.

Even if I am the only one with this problem, this can be useful if you need to
reset your fonts in the middle of a session (getting around the "In order to
have an effect, these must be changed prior to opening the first spectrum
window." clause in the File:Prefs:Fonts dialog.

This is a super-hacked solution, but it seems to work stably for and
. I hope it is useful for someone. And of course if someone has an idea
of what my original problem is, let me know.

Regards,

Bob

Dr. Robert J. Mallis

Iowa State University
Department of Biochemistry, Biophysics and Molecular Biology
4264 Molecular Biology Building
Ames, IA 50011