Syntax
[C/C++:]
void gReturnStrInfo(char string[], float *rlen, int *nnl, float *tch, float *sch, int *nesc);
[F90:]
subroutine gReturnStrInfo(string, rlen, nnl, tch, sch, nesc)
character, intent(in) :: string
real, intent(out) :: rlen,tch,sch
integer, intent(out) :: nnl,nesc
Arguments
string
Character string
rlen
Maximum length of string
nnl
Number of lines contained in string
tch
Maximum character height
sch
Maximum height above base line
nesc
Number of non escape characters in string
Description
The routine gReturnStrInfo() returns information concerning the dimensions of a particular character string.
For strings without any *N escape sequences,
rlen returns the total length of the string taking into account the width of every character in the string and the layout of exponents and indices, and
nnl will return 1. If the string contains one or more of the *N escape sequences,
rlen will return the length of the longest line in
string and
nnl will return the number of lines.
The length of the string is calculated by adding the width of each character taking into account variable widths of hardware or software proportional fonts. The same calculation is made for the layout of justified strings. If GINO is unable to obtain the widths of characters for hardware fonts the current character width as set by gSetCharSize() is used for every character.
tch measures the total height of the string including exponents, indices, descenders and multiple lines.
sch measures only that part of the string above the base line (of the first line if there are multiple lines).
nesc returns the number of non escape characters within the string, that is the number of characters that will actually be displayed on output.
See Also
gReturnStrInfo UsagegDisplayStrgRotate