fontinformation
FONT
,
SIZE
,
STYLE
,
ASCENT
,
DESCENT
,
LEADING
,
MAXWIDTH

The fontinformation statement accesses information about a font (see also the fontinfo( function).


Parameters

This statement has seven parameters:

font – is the name of the font, for example "Verdana" or "Espy Sans".

size – is the size of the font (in points), for example 9, 24 or 11.5.

style – the style of the font, for example bold, italic or bolditalic. For a plain style leave this parameter blank. You can also specify the style numerically by adding up individual styles (1=bold, 2=italic, 4=underline).

ascent – must be a variable or numeric field which will receive the font ascent (in points). This is the distance from the baseline to the top of the tallest character in the font. (Note: This value is usually not an integer.)

descent – must be a variable or numeric field which will receive the font descent (in points). This is the distance from the baseline to the bottom of the lowest letter (usually g or y) in the font.

leading – must be a variable or numeric field which will receive the leading (in points). This is the distance between the lines.

maxwidth – must be a variable or numeric field which will receive the width of the widest character in the font (in points).


Description

This statement will return the measurements of the specified font. This example opens an edit window for the field CheckNum, making the edit window six lines high and 200 points wide.

local  fontName,fontSize,fontAscent,fontDescent,fontLeading,fontWidth,fontHeight
fontName="Verdana"
fontSize=14
fontinformation fontName,fontSize,0,fontAscent,fontDescent,fontLeading,fontWidth
fontHeight=fontAscent+fontDescent+fontLeading
floatingedit "CheckNum",20,20,fontHeight*6,200,fontName,fontSize,0

Note: Panorama now includes the fontinfo( function which can return much more information about a font than the fontinformation statement does.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.