www.gibmonks.com




  Previous section   Next section

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 39.  Fonts and Text Attributes


The font Command

Table 39-3 summarizes the font command. In the table, font is either a description of font parameters, a logical font name, a system font name, or an X font name. The -displayof option applies to X where you can have windows on different displays that can support different fonts. Note that when you delete a logical font name with font delete, the font is not really deleted if there are widgets that use that font.

Table 39-3. The font command.
font actual font ?-displayof window? ?option?Returns the actual parameters of font.
font configure fontname ?option? ?value option value?Sets or queries the parameters for fontname.
font create ?fontname? ?option value ...?Defines fontname with the specified parameters.
font delete fontname ?name2 ...?Removes the definition for the named fonts.
font families ?-displayof win?Returns the list of font families supported on the display of win.
font measure font ?-displayof win? textReturns the width of text displayed in win with font.
font metrics font ?-displayof win? ?option?The option can be -ascent, -descent, -linespace, or -fixed.
font namesReturns the names of defined fonts.


      Previous section   Next section
    Top