    	SUBROUTINE IFTEXT( NCHS, TEXT, IR, ARRAY )
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY	JAN-1986
C
C	THIS ROUTINE HANDLES THE GRAPHTEXT PLOTTING.
C
C	NCHS -------- NUMBER OF CHARACTERS IN "TEXT".
C	TEXT -------- TEXTSTRING TO BE PLOTTED IN CHARACTER FORMAT.
C	IR ---------- LENGTH OF THE "ARRAY"
C	ARRAY(1) ---- STARTING POSITION (X) OF "TEXT".
C	ARRAY(2) ---- STARTING POSITION (Y) OF "TEXT"
C	ARRAY(3) ---- WIDTH OF "TEXT" IN INCHES.
C	ARRAY(4) ---- HEIGHT OF "TEXT" IN INCHES.
C	ARRAY(5) ---- ROTATION ANGLE OF "TEXT" IN DEGREES.
C
    	INCLUDE 'LN03PS.CBS'
     	PARAMETER SF= 0.1, FP= 150.0
    	CHARACTER	TEXT(1)*1, FONT*2
     	DIMENSION	ARRAY(1)
     	INTEGER		SFONT(99,3)
     	SAVE		SFONT

     	IF( NCHS.EQ.0 ) RETURN
     	IRR = IR
	IF( IRR.GT.4 .AND. ARRAY(5).NE.0.0 ) RETURN
     	IF( NVEC.GT.0 ) CALL IFPLOT_DUMP(0)
C
C  GET THE FONT SIZE...
C
     	IFS = 12
     	IF( IRR.GT.2 .AND. ARRAY(3).GT.0.0 ) THEN
     	    IFS  = INT(FP*ARRAY(3))
     	    IF( IFS.LT.1 ) IFS = 1
     	    IF( IFS.GT.99 ) IFS = 99
     	ENDIF
     	IF( IFN.EQ.1 ) FONT = 'hs'	!HELVETICA
     	IF( IFN.EQ.2 ) FONT = 'ho'	!HELVETICA-OBLIQUE
     	IF( IFN.EQ.3 ) FONT = 'hb'	!HELVETICA-BOLD
     	K = 1
     	IF( IFS.GT.9 ) K = 2
     	IF( SFONT(IFS,IFN).NE.IFS ) THEN
     	    SFONT(IFS,IFN) = IFS
     	    IF( IFN.EQ.1 ) WRITE(LUN,222) IFS,IFS,IFS,IFS
222	    FORMAT(
     +'/fs',I<K>,' /Helvetica findfont ',I<K>,' scalefont def'/
     +'/hs',I<K>,' {moveto fs',I<K>,' setfont show} def')
     	    IF( IFN.EQ.2 ) WRITE(LUN,223) IFS,IFS,IFS,IFS
223	    FORMAT(
     +'/fo',I<K>,' /Helvetica-Oblique findfont ',I<K>,' scalefont def'/
     +'/ho',I<K>,' {moveto fo',I<K>,' setfont show} def')
     	    IF( IFN.EQ.3 ) WRITE(LUN,224) IFS,IFS,IFS,IFS
224	    FORMAT(
     +'/fb',I<K>,' /Helvetica-Bold findfont ',I<K>,' scalefont def'/
     +'/hb',I<K>,' {moveto fb',I<K>,' setfont show} def')
     	ENDIF
C
C  GET THE LABEL POSITION...
C
     	XPS = ARRAY(1)
     	YPS = ARRAY(2)
     	IF( XANG.NE.0.0 .OR. YANG.NE.0.0 ) THEN
     	    XOP = XPS*XCTH-YPS*YSTH
     	    YPS = XPS*XSTH+YPS*YCTH
     	    XPS = XOP
     	ENDIF
     	XPS = SF*(FLOAT(IXO)+FUNI*(XORS+XSCL*XPS))
     	YPS = SF*(FLOAT(IYO)+FUNI*(YORS+YSCL*YPS))
C
C  WRITE THE LABEL OUT...
C
     	WRITE(LUN,1000) (TEXT(I),I=1,NCHS), XPS, YPS, FONT, IFS
1000	FORMAT('(',<NCHS>A1,')',2F7.1,X,A2,I<K>)

999	RETURN
    	END

