Search Locate Previous Next Contents

Column Titles Font

As installed, NewLeaf uses 13-point bold Helvetica (Arial) as the default font for column titles. A font is specified by a three-part description: the typeface, the character height in points and the line-spacing in points. For example, ‘TI,12’ corresponds to 12-point Times with default line-spacing (120% of the character height); ‘HEB,10/11’ corresponds to 10-point Helvetica bold with 11-point line-spacing. See Fonts for a detailed discussion of fonts, and the preceding tutorial for a discussion of changing table fonts. The column titles appear in 10-point Helvetica if you type:

leaf.Init ª leaf.Use''
leaf.table.TFont 'HE,10'
leaf.table.Titles districts
leaf.table.List salesQ1
View doc„leaf.Close

There are three points to note here. First, the column title font can be specified before or after the column titles are set. Second, NewLeaf accepts only one font specification for the column titles, and this is used for all of the column titles. Third, NewLeaf always uses the default line-spacing for the column title font, and it ignores the third part, if present, of any font specification. To prove this, try the previous example with a font specification of ‘HE,10/20’ and you will see that there is no difference in the line height of the column titles.

Turning to the sales report, specify 10-point Times as the column title font, the same as the font used for the row titles:

leaf.Init ª leaf.Use''
leaf.table.Font (›'TI,10'),((¯1+¯1†½salesQ1)½›'HE,10'),›'HEB,10'
leaf.table.Qfmt (›''),((¯1+¯1†½salesQ1)½›'CF8.1'),›'CF9.1'
leaf.table.Align (›'left'),(¯1†½salesQ1)½›'decimal1'
leaf.table.CellWidths 72×0.9,((¯1+¯1†½salesQ1)½0.75),0.8
leaf.table.Gridlines 1,(›0.5,(1-¯1†½salesQ1)†0.5),0
leaf.table.Spacing 1 1
leaf.table.TFont 'TI,10'
leaf.table.Titles (›''),(¯1‡›[1]regions,[0.5]districts),¯1†districts
leaf.table.TAlign (›'centre'),((¯1+¯1†½salesQ1)½›'right'),›'centre'
leaf.table.List ¯1‡[1]products,salesQ1
leaf.table.Rule 0.5
leaf.table.Spacing 3 3
leaf.table.List ¯1†[1]products,salesQ1
View doc„leaf.Close


Continue to: Titles Spanning More Than One Column
© Copyright Causeway Graphical Systems Ltd 2001