Design: 04.02.03.01/P03

This is an abstract, language-independent design. Grim details may be found in the corresponding source code. You may return to the documentation for the module containing this program design, or to the entire hierarchical table of topics covered by the PVT.


PROGRAM 3: Appearance of all text fonts

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

NON-MANDATORY REGISTERED TEXT FONTS: These screens display a
sample of supported registered text fonts (at most 8).  For each
displayed line, look up its text font identifier in the ISO
register and verify that the actual appearance of the text agrees
with the ISO specification.

IMPLEMENTOR DEFINED TEXT FONTS: These screens display a sample of
implementor defined text fonts (at most 8).  For each displayed
line, look up its text font identifier in the implementor's
documentation and verify that the actual appearance of the text
agrees with the specification.  Also verify that font identifiers
are described in a workstation independent way, i.e. the same
identifier must not specify different fonts for different
workstation types.

COMPLETE DOCUMENTATION FOR IMPLEMENTOR TEXT FONTS: No associated
picture.  Verify that all the entries in the list of available
text fonts for this workstation type are documented by the
implementor.  The list may be a subset of the documented text
fonts.

UNIFORM HEIGHT FOR CHARACTER BODIES: Each column has a character
string composed of some short characters followed by some tall
characters.  In every string but one, each of its characters
should line up between the horizontal lines.  Identify the one
string where this is not so.

CHARACTER HEIGHT FOR SIZE OF CAPITAL LETTERS: First, report all
alphabetic stroke fonts to be tested, other than 1 or 2.  The
screen will then show several lines of boxed text primitives.  In
all lines but one, the capital letters should just fit between
the displayed capline (dashed) and baseline (dotted).  Identify
the line in which the letters are too tall or too short.

IDENTIFY UNREPRESENTED CHARACTER CODES: You must enter a list of
integers for which font 1 or 2 has no graphic representation.  If
this is an ASCII machine, values between 0 and 31 may qualify.
Any entries beyond the first 6 are ignored.  If all values
are representable, indicate the null list by entering "n".
Since the entered character codes will be used by the program
to generate a text primitive, do not enter any codes which will
cause the implementation to take some special action.

APPEARANCE OF UNREPRESENTED CHARACTER CODES:  The implementation
must provide a special representation or symbol to indicate the
presence of character codes within a text string for which the
font has no normal representation.  Identify all and only the
positions in the displayed text string which contain this
distinctive symbol.  There may be different symbols for different
non-representable codes.

UNSUPPORTED TEXT FONT AND PRECISION PAIRS: All lines but one should
be identical, having defaulted or been explicitly set to font=1,
precision=STRING.  One line, written with font=2, precision=STRING,
should therefore be distinct and is the line to be indicated.

DESIGN:

use <inquire text facilities> to determine
  lposfn = list of positive fonts and highest available precision
           for each, other than fonts 1 and 2
  lnegfn = list of non-positive fonts and highest available precision
           for each
  lstrk  = list of fonts available in STROKE precision

chstr = character string = AaZz09$;^}
lcc = list of character codes = codes for chstr

if (lposfn empty)
   informative message: no non-mandatory text fonts
   goto end_pos
endif

TEST: #SR 11 13 19 21
      "All positive text fonts should appear as specified in the
       ISO register."

informational message: SR 19 is indirectly confirmed in the
following test case since this test must be run against all
workstation types, and the ISO register documentation must be
correct for all of them.

ldisp = list of fonts to be displayed
if (number of entries in lposfn > 8) then
   ldisp = 8 randomly chosen from lposfn
else
   ldisp = all of lposfn
endif

display lcc
display chstr for each font in ldisp, using that
  font's associated precision
label each chstr

OPQA/NON-MANDATORY REGISTERED TEXT FONTS: do all displayed,
  labelled text fonts agree with the corresponding description in
  the ISO register?
pass/fail depending on (operator responds "yes")

TEST: #SR 11 13 19 21 29 30
      "All positive text fonts should appear as specified in the
       ISO register, even when less precision is requested than
       is available for the font."

ldisp = list of fonts to be displayed
if (number of entries in lposfn > 8) then
   ldisp = 8 randomly chosen from lposfn
else
   ldisp = all of lposfn
endif

display lcc
display chstr for each font in ldisp, using a precision
  less than that font's associated precision (or equal if STRING)
label each chstr

OPQA/NON-MANDATORY REGISTERED TEXT FONTS: do all displayed,
  labelled text fonts agree with the corresponding description in
  the ISO register?
pass/fail depending on (operator responds "yes")

end_pos:

if (lnegfn empty)
   informative message: no non-mandatory text fonts
   goto end_font_id
endif

TEST: #SR 11 13 19 21
      "All non-positive text fonts should be workstation independent
       and appear as specified in the implementor's documentation."

ldisp = list of fonts to be displayed
if (number of entries in lnegfn > 8) then
   ldisp = 8 randomly chosen from lnegfn
else
   ldisp = lnegfn
endif

display lcc
display chstr for each font in ldisp, using that
  font's associated precision
label each chstr

OPQA/IMPLEMENTOR DEFINED TEXT FONTS: Answer y if both are true,
  otherwise n: 1) the implementor provides accurate documentation
  for all these fonts, and 2) the documentation indicates that a
  font identifier denotes the same font for all workstation types.
pass/fail depending on (operator responds "yes")

TEST: #SR 11 13 19 21 29 30
      "All non-positive text fonts should be workstation independent
       and appear as specified in the implementor's documentation,
       even when less precision is requested than is available
       for the font."

ldisp = list of fonts to be displayed
if (number of entries in lnegfn > 8) then
   ldisp = 8 randomly chosen from lnegfn
else
   ldisp = lnegfn
endif

display lcc
display chstr for each font in ldisp, using a precision
  less than that font's associated precision (or equal if STRING)
label each chstr

OPQA/IMPLEMENTOR DEFINED TEXT FONTS: Answer y if both are true,
  otherwise n: 1) the implementor provides accurate documentation
  for all these fonts, and 2) the documentation indicates that a
  font identifier denotes the same font for all workstation types.
pass/fail depending on (operator responds "yes")

if (ldisp = all of lnegfn)
   all negative fonts displayed already
   goto end_font_id
endif

TEST: #SR 21
      "All reported implementor-defined text fonts available for
       a given workstation type should be documented by the
       implementor."

list all reported implementor-defined text fonts in lnegfn

OPQA/COMPLETE DOCUMENTATION FOR IMPLEMENTOR TEXT FONTS: are all
  these fonts documented by the implementor?

pass/fail depending on (operator responds "yes")

end_font_id:

TEST: #SR 11 13 16 17 31 36 42 59
      "In each text font, all character bodies affected by the
       same character height, character expansion factor, and
       character spacing should have the same height."

set text precision = STROKE
set character spacing = chsp = 0.4
set text alignment = LEFT,TOP
set text path = DOWN

numcol = number of columns to display = 6
ngcol  = incorrect column = random number from 1 to numcol

display labels for all numcol columns to be shown

for ix = 1 to numcol
  txfnt  = random value from lstrk
  Use <inquire text extent> to determine
    ncsh = nominal vertical character body size /
           requested character height
           for txfnt
  chht   = random value from .2/numcol to .6/numcol
  chexp  = random value from .3 to 3
  chsiz  = vertical distance per character
         = chht * (ncsh + chsp)
  numch  = number of characters this string = vert-space / chsiz
  make sure numch between 4 and 25, else pick new values

  numsht = number of short characters = numch/2
  distrg = display string = numsht short characters
    followed by (numch-numsht) tall characters
  set text font = txfnt
  set character height = chht
  set character expansion = chexp
  display distrg in column ix
  if (ix = ngcol) then
     offact = offset factor = .80 or 1.20
  else
     offact = offset factor = 1.00
  endif

  draw horizontal lines between characters, assuming that chht,
    chsp, and chexp are in effect, distorted by offact
next ix

OPQA/UNIFORM HEIGHT FOR CHARACTER BODIES: In which column are the
  characters NOT aligned between the separators?
pass/fail depending on (operator indicates location ngcol)

TEST: #SR 1 11 14 16 17 31 58 59 75
      "Character height magnitude should specify the nominal height,
       in TLC, from baseline to capline, of all capital letters
       within a font."

OPQA/CHARACTER HEIGHT FOR SIZE OF CAPITAL LETTERS: Enter list of
  font identifiers available in stroke precision, other than 1
  and 2, which support alphabetic characters.
alfont = list of alphabetic fonts from operator
alfont = alfont + 1,2

numlin = 6
ngline = random integer between 1 and numlin
for ix = 1,numlin
   str = 3 random capital letters
   chht = random value between (0.2 and 0.8) * line-increment
   compute correct location of base, cap lines
   if (ix = ngline) then
      draw incorrect base, cap lines
      if (chht < 0.5 * line-increment) then
         draw lines 25% too far apart
      else
         draw lines 25% too close
      endif
   else
      draw correct base, cap lines
   endif
   curfnt = random pick from alfont
   display str, using + or - chht and curfnt
   label str
next ix

OPQA/CHARACTER HEIGHT FOR SIZE OF CAPITAL LETTERS: In which line
   are the upper-case letters NOT aligned between the dashed
   baseline and the dotted capline?
pass/fail depending on (operator picks location ngline)

OPQA/IDENTIFY UNREPRESENTED CHARACTER CODES: Enter list of 6 or
fewer character codes for which font 1 has no representation (n
if none).

unr1ls = operator response

OPQA/IDENTIFY UNREPRESENTED CHARACTER CODES: Enter list of 6 or
fewer character codes for which font 2 has no representation (n
if none).

unr2ls = operator response

if (unr1ls and unr2ls empty) then
   informative message: cannot test SR20, no unrepresentable
      character codes in fonts 1 or 2
   goto end_unrep
endif

TEST: #SR 13 14 20
      "There should be a implementation dependent way to depict a
       character code for which a font has no graphic
       representation."

if (unr1ls empty) then
   goto do_f2
endif

for all three precisions:
   str = random mix of ASCII and unrepresented character codes
   display str in font 1

   OPQA/APPEARANCE OF UNREPRESENTED CHARACTER CODES: The
   implementation has a special symbol to indicate the
   presence of non-representable character codes within
   a text string.  List, in order, all the character positions
   containing this special symbol.

   if (operator response incorrect) then
      fail
      goto end_unrep
   endif
next precision

if (unr2ls empty) then
   pass
   goto end_unrep
endif

do_f2:
for all three precisions:
   str = random mix of ASCII and unrepresented character codes
   display str in font 2

   OPQA/APPEARANCE OF UNREPRESENTED CHARACTER CODES: The
   implementation has a special symbol to indicate the
   presence of non-representable character codes within
   a text string.  List, in order, all the character positions
   containing this special symbol.

   if (operator response incorrect) then
      fail
      goto end_unrep
   endif
next precision
pass

end_unrep:

TEST: #SR 11 13 15 22 27
      "If text display is requested with an unavailable font or
       precision, font=1 and precision=STRING should be used."

lunsfn,lunspr = list of unsupported font,precision pairs

within lposfn, find at most 2 fonts in non-STROKE precision.
for each such add entry to list: font and lowest unavailable
  precision.

within lnegfn, find at most 2 fonts in non-STROKE precision.
for each such add entry to list: font and lowest unavailable
  precision.

(minstr, maxstr) = (minimum, maximum) font identifier in lstrk
add to list of unsupported:
minstr -   1, STRING
minstr - 100, STROKE

maxstr +   1, STROKE
maxstr + 100, STRING

add (1,STRING) to lunsup
as last entry add (2,STRING) to lunsup
numlin = size of lunsup
perm = array to randomize order of lunsup

label all lines from 1 to numlin
do ix = 1 to numlin
   display text using lunsfn(perm(ix)), lunspr(perm(ix)) on line ix
next ix

OPQA/UNSUPPORTED TEXT FONT AND PRECISION PAIRS: which line is
  different?
pass/fail depending on (operator picks text written with (2,STRING))

END PROGRAM 3