|
fontCreate and inspect fonts.
SYNOPSIS(font option ?arg arg ...?)DESCRIPTIONThe font procedure provides several facilities for dealing with fonts, such as defining named fonts and inspecting the actual attributes of a font. The procedure has several different forms, determined by the first argument. The following forms are currently supported:
FONT DESCRIPTIONThe 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.
normal bold roman italic underline overstrike
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. FONT METRICS
FONT OPTIONSThe 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:
Sizes should normally be specified in points so the application will remain the same ruler size on the screen, even when changing screen resolutions or moving scripts across platforms. However, specifying pixels is useful in certain circumstances such as when a piece of text must line up with respect to a fixed-size bitmap. The mapping between points and pixels is set when the application starts, based on properties of the installed monitor, but it can be overridden by calling (tk-state 'scaling).
PLATFORM-SPECIFIC ISSUESThe following named system fonts are supported:
|