-
- font metrics font ?-displayof window? ?option?
Returns information about the metrics (the font-specific data), for
font when it is used on
window 's display.
font is a font description; see
FONT DESCRIPTIONS below. If the
window argument is omitted, it defaults to the main window. If
option is specified, returns the value of that metric; if it is omitted, the return value is a list of all the metrics and their values. See FONT METRICS below for a list of the possible metrics.
FONT METRICS edit
The following options are used by the '
font metrics command to query font-specific data determined when the font was created. These properties are for the whole font itself and not for individual characters drawn in that font. In the following definitions, the "baseline" of a font is the horizontal line where the bottom of most letters line up; certain letters, such as lower-case "g" stick below the baseline.
- -ascent
- The amount in pixels that the tallest letter sticks up above the baseline of the font, plus any extra blank space added by the designer of the font.
- -descent
- The largest amount in pixels that any letter sticks down below the baseline of the font, plus any extra blank space added by the designer of the font.
- -linespace
- Returns how far apart vertically in pixels two lines of text using the same font should be placed so that none of the characters in one line overlap any of the characters in the other line. This is generally the sum of the ascent above the baseline line plus the descent below the baseline.
- -fixed
- Returns a boolean flag that is "1" if this is a fixed-width font, where each normal character is the the same width as all the other characters, or is "0" if this is a proportionally-spaced font, where individual characters have different widths. The widths of control characters, tab characters, and other non-printing characters are not included when calculating this value.
See also edit