font actual

font actual font ?-displayof window? ?option?

Returns information about the actual attributes that are obtained when font is used on window 's display; the actual attributes obtained may differ from the attributes requested due to platform-dependant limitations, such as the availability of font families and pointsizes. font is a font description; see FONT DESCRIPTIONS . If the window argument is omitted, it defaults to the main window. If option is specified, returns the value of that attribute; if it is omitted, the return value is a list of all the attributes and their values. See FONT OPTIONS for a list of the possible attributes.

Question: what kind of paramater is given to the -displayof argument? A Tk window name ?

For instance, if I say:

  button .b -font fixed
  font actual -dislayof .b

I see an error. However, I seem to get some sort of answer when I say:

  font actual .b

Are the results the real information, or the info that Tk uses, then deviates from until it finds a best match?

Feb 18th: You're using the wrong syntax for font actual. It should be [font actual font -displayof window], with "-displayof window" being optional. For example:

  font actual "Arial"
  font actual "Arial" -displayof .b

If the font doesn't exist, Tk uses a default; that's what's returned, if you don't have a font called .b and use [font actual .b]. When you use [font actual -displayof .b] you raise an error because you're missing the font argument.