Design: 04.02.04.02/P04
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 4: 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.
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.
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 an annotation text relative 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 an annotation text string for
which the font has no normal representation. Identify all and
only the positions in the displayed annotation text string which
contain this distinctive symbol. There may be different symbols
for different non-representable codes.
DESIGN:
set all ASFs to BUNDLED
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 1 3 4 11 12 13
"All positive text fonts should appear as specified in the
ISO register."
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 annotation text chstr for each font in ldisp, using a
text representation with 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 1 3 4 11 12 13 21 22
"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 annotation text chstr for each font in ldisp, using a text
representation with 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 1 3 4 11 12 13
"All non-positive text fonts should 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 annotation text chstr for each font in ldisp, using a text
representation with that font's associated precision
label each chstr
OPQA/IMPLEMENTOR DEFINED TEXT FONTS: Do all displayed, labelled
text fonts agree with the corresponding description in the
implementor documentation?
pass/fail depending on (operator responds "yes")
TEST: #SR 1 3 4 11 12 13 21 22
"All non-positive text fonts should 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 annotation text chstr for each font in ldisp, using a text
representation with a precision less than that font's associated
precision (or equal if STRING)
label each chstr
OPQA/IMPLEMENTOR DEFINED TEXT FONTS: Do all displayed, labelled
text fonts agree with the corresponding description in the
implementor documentation?
pass/fail depending on (operator responds "yes")
if (ldisp = all of lnegfn)
all negative fonts displayed already
goto end_font_id
endif
end_font_id:
TEST: #SR 1 3 4 11 12 16 17 23 24 25 27 28
"In each text font, all character bodies affected by the
same annotation text character height, character expansion
factor, and character spacing should have the same height."
set annotation text alignment = LEFT,TOP
set annotation 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
chsp = character spacing = 0.4
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 annotation character height = chht
set text index = ix
set text rep #ix: font, precision, expansion, spacing, color
txfnt, STROKE, chexp, chsp, 1
display annotation text 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)
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 SR46, no unrepresentable
character codes in fonts 1 or 2
goto end_unrep
endif
TEST: #SR 1 3 4 11 12 14 19
"There should be an implementation dependent way to depict
a character code for which a font has no graphic
representation."
if (unr1ls empty) then
goto do_f2
endif
set text index = 1
for prec = STRING,CHAR,STROKE
str = random mix of ASCII and unrepresented character codes
set text rep #1: font, precision, expansion, spacing, color
1, prec, 1.0, 0.2, 1
display annotation text str, using index #1
OPQA/APPEARANCE OF UNREPRESENTED CHARACTER CODES: The
implementation has a special symbol to indicate the
presence of non-representable character codes within
an annotation 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:
set text index = 1
for prec = STRING,CHAR,STROKE
str = random mix of ASCII and unrepresented character codes
set text rep #1: font, precision, expansion, spacing, color
2, prec, 1.0, 0.2, 1
display annotation text str, using index #1
OPQA/APPEARANCE OF UNREPRESENTED CHARACTER CODES: The
implementation has a special symbol to indicate the
presence of non-representable character codes within
an annotation 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:
END PROGRAM 4