NIPO ODIN Version 5.17

*FONT (switching)

Purpose

Switches to an earlier defined font.

Syntax

*FONT <n|[expression]>

Description

Selects an earlier defined font. Can be used as a question option or in question or code texts. The selected font will remain active until a new font is selected. Every time the screen is cleared, the current font is set to the default font (*FONT 0) or to the font specified in the question option.

Arguments

n|expression
This is a positive integer or expression that refers to an earlier defined font.

Example 1

*FONT 0 "8 ARIAL"
*FONT 1 "8 ARIAL BOLD"
*FONT 2 "8 ARIAL ITALIC"
*QUESTION 1 *CODES 61 *FONT 1
Do you use a personal computer?

1: Yes
2: No

*QUESTION 2 *CODES 62 *NCLS *IF [Q1,1]
Do you use it for *FONT 2business*FONT 0 or *FONT 2personal*FONT 0 purposes?

1: Business
2: Personal
3: Both

Result:

Embedded PNG Image Template (Styled)

Example 2

*FONT 1 "8 COURIER BOLD"
*INFO *FONT 1

This is an info page

In this example, the info page is displayed in Courier Bold.

Example 3

*FONT 0 "10 ARIAL (255 0 0) BOLD"
*FONT 1 "10 ARIAL BOLD"
*FONT 2 "10 ARIAL (0 0 255) BOLD"
*VARS x
*REPEAT 201 *RANDOM
*PUT x [?R-101]
*IF [x<>0] *END
*ENDREP

*PAGE *FONT 1

This randomizer draws a number between -100 and 100
Negative numbers are printed in *FONT 0red*FONT 1
Positive numbers are printed in *FONT 2blue*FONT 1

*FONT [2*(x>0)]*? x*FONT 1

*END

See Also