1C*GRSFNT -- set text font
2C+
3      SUBROUTINE GRSFNT (IF)
4      INTEGER IF
5C
6C GRPCKG: Set the font for subsequent text plotting.
7C The default font is 1 ("Normal" font); others available are 2
8C ("Roman"), 3 ("Italic"), and 4 ("Script").
9C
10C Argument:
11C  IF (input): the font number to be used for subsequent
12C       text plotting on the current device (in range 1-4).
13C--
14C 19-Mar-1983 - [TJP].
15C  4-Jun-1984 - add code for GMFILE device [TJP].
16C 15-Dec-1988 - change name [TJP].
17C-----------------------------------------------------------------------
18      INCLUDE 'grpckg1.inc'
19      INTEGER    I
20C
21      IF (GRCIDE.LT.1) THEN
22          CALL GRWARN('GRSFNT - no graphics device is active.')
23          RETURN
24      END IF
25C
26C Set software font index.
27C
28      IF (IF.LT.1 .OR. IF.GT.4) THEN
29          CALL GRWARN('Illegal font selected: font 1 used.')
30          I = 1
31      ELSE
32          I = IF
33      END IF
34C
35C Ignore request if no change is to be made.
36C
37      IF (IF.EQ.GRCFNT(GRCIDE)) RETURN
38C
39C Save font setting.
40C
41      GRCFNT(GRCIDE) = I
42C
43      END
44