	SUBROUTINE IFFONT( IFONT )
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY, JUNE-1988
C
C	THIS ROUTINE SELECTS ACTIVE FONT FOR TEXT DRAWING.
C
C	IFONT = 1: STANDARD FONT AS DEFINED IN "IFINIT".
C	IFONT = 2: ITALIC STANDARD FONT.
C	IFONT = 3: BOLDFACE STANDARD FONT.
C
     	INCLUDE 'TEKLIB.CBS'

     	IF( IFONT.EQ.IFN .OR. IFONT.LT.1 .OR. IFONT.GT.3 ) GOTO 999

     	IF( ITM.EQ.1 ) GOTO 888

     	IF( IFONT.EQ.2 .OR. IFN.EQ.2 ) THEN
    	    IF( ITM.EQ.2 ) THEN		!TEK-4100
     		IF( IPL.GT.NBS-IPK-7 ) CALL IFINIT_DUMP
     		IPB(IPL+1) = 27		!<ESC>MA slant-angle
     		IPB(IPL+2) = 77
     		IPB(IPL+3) = 65
     		IPL = IPL + 3
     		IF( IFONT.EQ.2 ) CALL IFPACK_TEKINT( 15 )
     		IF(   IFN.EQ.2 ) CALL IFPACK_TEKINT(  0 )
     		IPL = IPL + 1
     		IPB(IPL) = 48
     	    ENDIF
     	    IF( ITM.EQ.3 ) THEN		!REGIS
     		IF( IPL.GT.NBS-IPK-8 ) CALL IFINIT_DUMP
     		IPB(IPL+1) = 'T'
     		IPB(IPL+2) = '('
     		IPB(IPL+3) = 'I'
     		IPL = IPL + 3
     		IF( IFONT.EQ.2 ) CALL IFPACK_REGIS( 15 )
     		IF(   IFN.EQ.2 ) CALL IFPACK_REGIS(  0 )
     		IPL = IPL + 1
     		IPB(IPL) = ')'
     	    ENDIF
     	ENDIF

888	IF( IDW.NE.0 ) THEN
     	    IF( NPPS.GT.0 ) CALL IFPLOT_DUMP
     	    WRITE(IDF,1000) IFN
     	ENDIF
1000	FORMAT('FONT:',I3)
     	IFN = IFONT

999	RETURN
	END

