The following indices are available:
sub Font { ?subcmd? args } {}
The idea behind this routine: we define a logical font name (eg Times, or LabelFont) with the basic properties of the font (eg registry, foundry, charset, but also size and slant).
A definition looks like this:
Font def LabelFont \
-foundry adobe -family helvetica -charset iso8859 \
-encoding 1 -spacing p -pixel 0 \
-slant normal -width normal -weight normal -size 14
As you can see I used the standard XLFD conventions (don't know enough about Windows or Mac). This defines a font named LabelFont for subsequent use.
I have added the possibility to give standard attribute values for many of the more complicated things of X font naming (there are different names to indicate slant on X fonts - i and o for example). You always say -slant italic, the font routines do the proper conversions if you have already given -foundry and -family.
All values not mentioned will be replaced by * in the output.
Logical fontnames make it easy to change fonts througout the source code as the use looks always something like this:
button .b -text "huhu?" -font [Font get LabelFont]
To give the button a bold appearance you can define a new logical font or (if this is just a onetime change) do this
button .b config -font [Font get LabelFont -weight bold]
Of course you can do more complicated things:
button .b -font [Font get LabelFont -weight bold \
-slant italic -size 24]
See one of the X books (eg Oliver Jones Introduction To The X Window System) for a proper description of what they mean. this routine returns an empty string