3.2.2 Font Property
You can specify the font property with a string containing the font name, style, and size, separated by dashes, or by creating a java.awt.Font object.
font = 'Verdana-BOLD-12';
font = new java.awt.Font('Verdana', java.awt.Font.BOLD, 12);
The name of the font can be a TrueType font name, or a logical font name. Logical font names are not recommended, however, because the logical font may be replaced by a different font in the runtime environment.
There are three font styles, Font.PLAIN, Font.BOLD and Font.ITALIC. The styles can be combined with a bitwise OR.
font = new java.awt.Font('Verdana', java.awt.Font.BOLD |
java.awt.Font.ITALIC, 12);
The final parameter specifies the size of the font.
Style Intelligence provides an extended font that supports additional styles:
Table 2. Font Styles
Font Style |
Description |
Underline |
Draw an underline below the text. The line style can be any one of the Style Intelligence Line Styles. |
Strikethrough |
Draw a line through the text in the middle. |
Superscript |
Draw the text at the upper corner of the previous text. |
Subscript |
Draw the text at the lower corner of the previous text. |
SMALLCAPS |
Draw all letters in capital letter, but draw the lowercase letters in a smaller size. |
Allcaps |
Convert all letters to uppercase. |
Shadow |
Draw the text with a shadow effect. |
To create an extended font, you must use the fully qualified name of inetsoft.report.StyleFont class.
font = new inetsoft.report.StyleFont('Verdana',
java.awt.Font.BOLD |
inetsoft.report.StyleFont.UNDERLINE, 12,
StyleConstant.THIN_LINE);
The final parameter specifies the line style used to draw the underline.
See Also
SI.41, StyleReport Object, for commonly-used constant values.
| << 3.2.1 Color Property | © 1996-2013 InetSoft Technology Corporation (v11.5) | 3.2.3 Visibility Property >> |