This program demonstrates the setting of different text Fonts, precisions and character up vectors. String precision may ignore the character-up-vector. In Font 1, char precision is treated like stroke. Font -2 is implementation-dependent.
PROGRAM FONTS
INCLUDE 'GKS$GTSDEV'
INCLUDE 'GKS$ENUM'
INTEGER errfil
PARAMETER(errfil = 6)
INTEGER wkid
PARAMETER(wkid = 1)
INTEGER asflst(1:13)
DATA asflst /13 * gindiv/ ! set all ASFs
C
CALL gopks(errfil, 0) ! open gks (BUFA not used)
CALL gopwk(wkid, 6, T4107) ! open workstation
CALL gsasf(asflst) ! set attributes individually
CALL gacwk(wkid) ! activate workstation
CALL gselnt(1) ! select norm transf.
CALL gswn(1, 0.0,10.0,0.0,10.0) ! set window
C
CALL gschh(0.3) ! set character height
CALL gstxfp(1, gstrp) ! set font 1, string precision
CALL gtx(1.0, 1.5, 'Font 1 string prec')
CALL gschup(1.0, 3.0) ! set character up vector
CALL gstxfp(1, gcharp) ! font 1, char precision
CALL gtx(5.0, 8.0, 'Font 1 char prec')
CALL gschup(-1.0, 0.5)
CALL gstxfp(1, gstrkp) ! font 1, stroke precision
CALL gtx(2.0, 4.5, 'Font 1 stroke prec')
CALL gstxfp(-2, gstrp) ! font -2, string precision
CALL gtx(2.0, 3.0, 'Font -2 string prec')
CALL gschup(0.5, -1.0)
CALL gstxfp(-2, gcharp) ! font -2, char precision
CALL gtx(7.0, 6.5, 'Font -2 char prec')
CALL gschup(1.0, 0.0)
CALL gstxfp(-2, gstrkp) ! font -2, stroke precision
CALL gtx(8.0, 5.5, 'Font -2 stroke prec')
CALL gdawk(wkid) ! deactivate workstation
CALL gclwk(wkid) ! close workstation
CALL gclks ! close GKS
END