      SUBROUTINE Y_TEXT(LUS,STRING,IFONT)
C
C----------------------------------------------------------------------
C.IDENTIFICATION: Subroutine Y_TEXT
C.LIBRARY:        GRAPHSERV
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 - 25 Jun 93 - Prototype
C.                0.0a- 19 Jul 94 - using stream I/O (ddf)
C.                0.1 - 17 Aug 94 - officialized + common clientside.inc
C.PURPOSE:        send opcode for text        
C.SYNTAX:         CALL Y_TEXT (string,ifont)
C.PARAMETERS:     CHARACTER   string   string to be plotted
C                 INTEGER     font     font code to be used
C----------------------------------------------------------------------
C
C-->  the calling sequence is provisional, this is a composite
C-->  primitive combining text and font setting
C-->  why put font setting here and not separately ?
C-->  why not put text mode, angle, and size here too ?
C-->  why not even put a move to x,y here ?
C
      INTEGER LUS(2)
      INTEGER IERR,ILEN,IFONT
      CHARACTER STRING*(*) 
      INCLUDE 'clientside.inc'
C
C     font selection
      OPCODE=110
*     WRITE(LUS(1),IOSTAT=IERR)OPCODE, IFONT      
      IBUF(2)=IFONT
      CALL Z_WRITE_STREAM(LUS(1),IBUF,8)      
C
C     actual text drawing               
      ILEN=LEN(STRING)
      OPCODE=7
*     WRITE(LUS(1),IOSTAT=IERR)OPCODE, ILEN,STRING         
      IBUF(2)=ILEN
C-->  max should be checked ILEN to be less than CHARBUFSIZE (4096)
      ARGS=STRING
      CALL Z_WRITE_STREAM(LUS(1),IBUF,8+ILEN)      
      RETURN
      END
