[buug] Tk and fonts

Ian Zimmerman itz at speakeasy.org
Mon Apr 14 18:21:23 PDT 2003


Hi buugers,

how (if at all) can I change the default font for Tk widgets, the way
one changes gtk fonts by editing the style|fontset entry in ~/.gtkrc?
I am trying to kill my monitor with high resolutions :) but the
default Tk font (which is, unfortunately, in terms of pixels, not
points) is way too small for them.

The more general problem is that Tk doesn't use the normal X resource
matching mechanism.  See the Tcl/Tk book, sections 25.[3-4]; what this
means is that I cannot simply say, for instance,

tkinfo*font: -some-large-fat-font-for-buttons
tkinfo*Text.font: -some-large-thin-font-for-text

in my ~/.Xresources file, because the first entry will trump the
second :-(

-- 
"This is the patent age of new inventions
For killing bodies, and for saving souls,
All propagated with the best intentions." 
George Gordon, lord Byron



More information about the buug mailing list