Object Reference : Object View and Procedure Reference : Table
  
 
setfont
Set the font for text in the specified table cells.
Syntax
table_name.setfont(cell_range) font_args
The font_args may include one or more of the following:
 
type([face], [pt], [+/- b], [+/- i], [+/- u], [+/- s])
Set characteristics of the font for the graph element type. The font name (face), size (pt), and characteristics are all optional. face should be a valid font name, enclosed in double quotes. pt should be the font size in points. The remaining options specify whether to turn on/off boldface (b), italic (i), underline (u), and strikeout (s) styles.
and type is one of “all”, “axes”, “legend”, “text”, “obs”, where “axes” refers to the axes labels, “legend” refers to the graph legend, “text” refers to the text objects, “obs” refers to the observation scale, and “all” refers to all of the elements.
Examples
tab1.setfont(B3:D10) "Times New Roman" +i
sets the font to Times New Roman Italic for the cells defined by the rectangle from B3 (row 3, column 2) to D10 (row 10, column 4).
tab1.setfont(3,B,10,D) 8pt
changes all of text in the region to 8 point.
tab1.setfont(4,B) +b -i
removes the italic, and adds boldface to the B4 cell (row 4, column 2).
The commands:
tab1.setfont(b) -s +u 14pt
tab1.setfont(2) "Batang" 14pt +u
modify the fonts for the column B, and row 2, respectively. The first command changes the point size to 14, removes strikethrough and adds underscoring. The second changes the typeface to Batang, and adds underscoring,
Cross-references
See Table::settextcolor and Table::setfillcolor for details on changing text color and font, and Table::setlines for drawing lines between and through cells.
For additional discussion of table commands see “Working with Tables and Spreadsheets”.
See also “Table and Text Objects” for a discussion and examples of table formatting in EViews.