Re: Font size




Fred and Charles

I played with this to ensure that Charles got a full window of tkemc with
tkemc.  This is a 640x480 TkEmc.  I used 8 font size which is pretty small
10 would be better but the text window will run off the bottom a bit if
there are any panels on the screen.

I put a note below about where to change 

Ray


On Mon, 18 Sep 2000, Fred wrote:
> Charles Hopkins wrote:
> 
> > How can I change the size if the font used in TkEmc?
<snip>
> Since emc/TkEmc is copied into /usr/X11/lib/X11/app-defaults, you'll
> need to edit that one for changes to have any effect. I
<snip>

> ---start---
> ! Set the colors for the main screen
> *top*background: blue
> *top*foreground: white
> *top*highlightColor: white
> *top*highlightBackground: blue
> 
> ! Default font is "variable", aka 12-point Helvetica bold.
> ! For 640x480 displays, use 10 point font.
> ! See /usr/X11/lib/X11/fonts/misc/fonts.alias for others.
> ! *top*font: -*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-*

This line above is the place to change from 8 to 10.  Since there is no 8
bold the ten will be much clearer.  10 just makes the buttons a little
taller.

> ! Set the font size specifically for the position digits. Do this after
> ! setting the global font *top*font, or that will override this.
> ! For 640x480 displays, use 24 point font, e.g.,
> ! *top*position*font: -*-courier-bold-r-normal-*-24-*-*-*-*-*-*-*
> *top*position*font: -*-courier-bold-r-normal-*-56-*-*-*-*-*-*-*
> 
> ! set background/foreground for labels that are clickable
> ! tool offset
> *top*settings*tooloffsetsetting*background: gray
> *top*settings*tooloffsetsetting*foreground: black
> ! jog speed
> *top*controls*oride*top*value*background: gray
> *top*controls*oride*top*value*foreground: black
> ! feed override
> *top*controls*feed*top*value*background: gray
> *top*controls*feed*top*value*foreground: black
> ---end---
> 
> The syntax is *widget*resource (or you can use . instead of * for exact
> matches), where "widget" is one of the names I gave the labels, etc. in
> tkemc.tcl (e.g., "top*position" for the "position" subwidget of the
> "top" widget), and "resource" is one of the predefined resources for the
> various widgets. This is fully described in Tcl/Tk books, and it takes
> quite of bit of explanation.
> 
> My advice: use TkEmc as the start, and fiddle with these. For your font
> problem, edit *top*position*font for the big numbers. For other numbers,
> look in the tkemc.tcl script for the widget that puts up what you want,
> using the rare comments in combination with the hints you get from
> widget names, and modify the "font" resource for these.
> 
> You can override all fonts with something like this:
> 
> *font: -*-courier-bold-r-normal-*-56-*-*-*-*-*-*-*
> 
> I didn't try this but I have done this before and it works, but is a
> one-size-fits all approach.
> 
> Font names can be shortened using the names in
> /usr/X11/lib/X11/fonts/misc/fonts.alias. You can potter about in the
> /usr/X11/lib/X11/fonts directory and see what's available, or use one of
> the font viewing tools that comes with Gnome or the KDE.
> 
> There is undoubtedly a way to change fonts within an application.
> Picture a "Fonts" menu in the tkemc, where you can select font sizes for
> various types of widgets: position digits, program window, labels.
> Adventuresome Tcl/Tk programmers can start with the widget demo in
> /usr/lib/tk8.0/demos/widget and see if anything's there.
 
> --Fred




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact