font - Create and inspect fonts.
font option ?arg arg ...?
The font command provides several facilities for dealing with
fonts, such as defining named fonts and inspecting the actual attributes of
a font. The command has several different forms, determined by the
first argument. The following forms are currently supported:
- font actual font ?-displayof window? ?option?
-
- font configure fontname ?option? ?value option value ...?
-
- font create ?fontname? ?option value ...?
-
- font delete fontname ?fontname ...?
-
- font families ?-displayof window?
-
- font measure font ?-displayof window? text
-
- font metrics font ?-displayof window? ?option?
-
- font names
-
The return value is a list of all the named fonts that are currently defined.
The following formats are accepted as a font description anywhere
font is specified as an argument above; these same forms are also
permitted when specifying the -font option for widgets.
- [1] fontname
-
- [2] systemfont
-
- [3] family pointsize ?stylelist?
-
normal bold roman italic
underline overstrike
- [4] X-font names (XLFD)
-
- [5] option value ?option value ...?
-
When font description font is used, the system attempts to parse the
description according to each of the above five rules, in the order specified.
Cases [1] and [2] must match the name of an existing named font or of a
system font. Cases [3], [4], and [5] are accepted on all
platforms and the closest available font will be used. In some situations
it may not be possible to find any close font (e.g., the font family was
a garbage value); in that case, some system-dependant default font is
chosen. If the font description does not match any of the above patterns,
an error is generated.
- -ascent
-
- -descent
-
- -linespace
-
- -fixed
-
The following options are supported on all platforms, and are used when
constructing a named font or when specifying a font using style [5] as
above:
- -family name
-
- -size pointsize
-
- -weight weight
-
- -slant slant
-
The amount the characters in the font are slanted away from the
vertical. Valid values for slant are roman and italic.
A roman font is the normal, upright appearance of a font, while
an italic font is one that is tilted some number of degrees from upright.
The closest available slant to the one specified will be chosen.
The default slant is roman.
- -underline boolean
-
The value is a boolean flag that specifies whether characters in this
font should be underlined. The default value for underline is false.
- -overstrike boolean
-
The value is a boolean flag that specifies whether a horizontal line should
be drawn through the middle of characters in this font. The default value
for overstrike is false.
The following named system fonts are supported:
- X Windows:
-
All valid X font names, including those listed by xlsfonts(1), are available.
- MS Windows:
-
system ansi device
systemfixed ansifixed oemfixed
- Macintosh:
-
system application
options
font
Copyright © 1996 Sun Microsystems, Inc.
Copyright © 1995, 1996 Roger E. Critchlow Jr.