| Search Locate Previous Next | Contents |
As installed, NewLeaf uses 12-point Times as the default font for all printing. 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 Customising NewLeaf for a detailed discussion of fonts. So, to produce the table in 10-point Helvetica with default (12-point) line-spacing, type:
leaf.Init ª leaf.Use'' leaf.table.Font 'HE,10' leaf.table.List salesQ1 View docleaf.Close
Note how many rows you can see in the Viewer. Now, squeeze them together by including an explicit value for the line-spacing in the font specification that is less than the calculated default and note how many rows you can see:
leaf.Init ª leaf.Use'' leaf.table.Font 'HE,10/11' leaf.table.List salesQ1 View docleaf.Close
In common with many other table-handling features of NewLeaf, the font can be set by column. For example, to emphasise the totals in the rightmost column, specify a bold version of the same font:
leaf.Init ª leaf.Use'' leaf.table.Font ((¯1+¯1½salesQ1)½'HE,10'),'HEB,10' leaf.table.List salesQ1 View docleaf.Close
Next, include product names in 10-point Times and combine this with the appropriate alignment and formatting in the sales report:
leaf.Init ª leaf.Use'' leaf.table.Font ('TI,10'),((¯1+¯1½salesQ1)½'HE,10'),'HEB,10' leaf.table.Align ('left'),(¯1½salesQ1)½'decimal1' leaf.table.Qfmt (''),((¯1+¯1½salesQ1)½'CF8.1'),'CF9.1' leaf.table.List products,salesQ1 View docleaf.Close