2.8 Explanation of Subroutines: Text Primitives

This is a group of subroutines for text primitives.



Two types of fonts can be used in GRPH 1. The font number can be selected by specifying the internal variable 'IFONT'. (Initial value is 1.) See Section  2.4.4, and Font Table in Sections 8.1.2 and 8.1.3.



Normally, the characters pressed on the keyboard are the ones displayed. The characters that are not included in the keyboard or those that are not displayed correctly can be drawn by giving the numbers (DCL character numbers) in the Font Tables as the argument for the function subprogram csgi. (See Section 2.12.1.)



Furthermore, when the internal variable 'LCNTL' is .true., superscripts and subscripts can also be used by making the control characters effective. (See Section 2.4.4.) For example, when the character numbers of the control characters have the values in Section 2.4.4, you should input

'(X_i")|2"'

to express

(Xi)2

(The final control character indicating the end of the superscript and subscript mode cannot be omitted.) The validity of the control characters will be checked by the subroutine szqtxw, which calculates the length and height of characters. Therefore, if the specification is not valid, an error message will be outputted from szqtxw.



The effective length of a text is determined using the function lenc (See CHRLIB) in MATH1. Therefore, if the NULL and blank characters at the end of the specified text are ignored.



A character is basically expressed as a set of line segments, so it is subject to clipping. (See Section 1.7.)