Module #04.02.03.01 : Text - individual attributes

All PVT documentation can be found under PHIGS Validation Tests - Overview. You may also return to the hierarchical table of topics covered by the PVT. For an explanation of the format of the individual module documentation, please see section 2.5 of the User's Guide.


DESCRIPTION: This module tests the individual text attributes.
These values control the appearance of text primitives when they
are under individual (as opposed to bundled) control.  In order
to explain clearly the effect of text aspects, some of the SRs
are worded in terms of the order of their application.  E.g. text
alignment and character up vector are described as if applied in
that order.  It is only the final appearance of the text
primitive, however, which is subject to test.

SEMANTIC REQUIREMENTS:

*** *** ***   Text Local Coordinates   *** *** ***


SR1. The Text Local Coordinate (TLC) system represents a unit-scaled rotation and shift within the Modelling Coordinate (MC) system, such that the TLC origin coincides with the MC text position, the TLC positive X-axis is parallel to the first text direction vector and the TLC positive Y-axis a) lies in the text plane, b) is perpendicular to the TLC X-axis, and c) has a positive dot product when multiplied by the second text direction vector.
#F 13 14
#D 7.3.1.5 7.3.1.6
#S 4.5.5/44/6 4.5.5/44/7
#T P03/7 P11/1 P11/2
#X 04.01.03


SR2. The text plane within MC is the plane that contains the text position and is perpendicular to the cross product of the first and second text direction vectors.
#F 13 14
#D 7.3.1.5 7.3.1.6
#S 4.5.1/35/1 4.5.5/44/6 4.5.5/44/7
#T P11/1 P11/2
#X 04.01.03

*** *** ***   Text in Device Coordinates   *** *** ***


SR3. For horizontal text paths (LEFT or RIGHT), the requested DC character height for a character within a displayed text string is the distance along the (vertical) leading edge of its character body between the baseline and capline, after transformation from TLC to DC.
#F 41
#D 3.3.12
#S 4.5.5/48/3 4.5.5/48/7 4.5.5/49/5
#T P04/4

SR4. For horizontal text paths, the requested DC character width for a character within a displayed text string is the distance along its baseline between the left and right edges of the character body, after transformation from TLC to DC.
#F
#D
#S 4.5.5/48/3 4.5.5/48/7 4.5.5/49/5
#T P04/4 #C This is because the width vector is evaluated "at the leading
edge" of a character.

SR5. For horizontal text paths, the (vertical) leading edge of a character body in a text string is its left or right edge, whichever is closest (in TLC) to the text position, after application of text alignment. If they are equidistant, it is the left edge.
#F
#D
#S 4.5.5/48/4
#T P04/4 #C Since the text position is always aligned at the TLC origin,
the leading edge is the one with the smallest magnitude TLC
x-coordinate before rotation due to the character up vector.

SR6. For vertical text paths (UP or DOWN), the requested DC character width for a character within a displayed text string is the distance along the (horizontal) leading edge of its character body between the left and right edges, after transformation from TLC to DC.
#F
#D 3.3.14
#S 4.5.5/48/3 4.5.5/48/7 4.5.5/49/5
#T P04/4

SR7. For vertical text paths, the requested DC character height for a character within a displayed text string is the distance along its centreline between the baseline and capline of the character body, after transformation from TLC to DC.
#F
#D
#S 4.5.5/48/3 4.5.5/48/7 4.5.5/49/5
#T P04/4 #C This is because the height vector is evaluated "at the leading
edge" of a character.

SR8. For vertical text paths, the (horizontal) leading edge of a character body in a text string is its top or bottom edge, whichever is closest (in TLC) to the text position, after application of text alignment. If they are equidistant, it is the top edge.
#F
#D
#S 4.5.5/48/4
#T P04/4 #C Since the text position is always aligned at the TLC origin,
the leading edge is the one with the smallest magnitude TLC
y-coordinate before rotation due to the character up vector.
*** *** ***   Text attribute inquiry   *** *** ***


SR9. If current element is text font, text precision, character expansion factor, character spacing, text colour index, character height, text path, text alignment, or character up vector, then <inquire current element type and size> returns the appropriate element type and size.
#F 303
#D 7.3.2.4.1 7.3.2.4.2 7.3.2.4.3 7.3.2.4.4 7.3.2.4.5
#D 7.3.2.4.6 7.3.2.4.7 7.3.2.4.8 7.3.2.4.9
#S 4.4.4/29/5
#T P01/1 P01/3 P01/5 P01/7 P01/9 P01/11 P01/13 P01/15 P01/17

SR10. If current element is text font, text precision, character expansion factor, character spacing, text colour index, character height, text path, text alignment, or character up vector, then <inquire current element content> returns the associated value for that element.
#F 304
#D 7.3.2.4.1 7.3.2.4.2 7.3.2.4.3 7.3.2.4.4 7.3.2.4.5
#D 7.3.2.4.6 7.3.2.4.7 7.3.2.4.8 7.3.2.4.9
#S 4.4.4/29/5
#T P01/2 P01/4 P01/6 P01/8 P01/10 P01/12 P01/14 P01/16 P01/18
*** *** ***   Text attribute traversal binding  *** *** ***


SR11. Upon traversal of a "text" or "text 3" element, the current text font, text precision, character expansion factor, character spacing, text colour index, character height, text path, text alignment, and character up vector in the PTSL are bound to the resulting primitive.
#F 36-44
#D 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6
#D 3.3.12 3.3.13 3.3.16 3.3.17 3.3.18 7.3.1.5 7.3.1.6
#S 4.5.2/38/3 4.5.2/40/3
#T P02/1 P02/2 P02/3 P02/4 P02/5 P02/6 P03/1 P03/2 P03/3 P03/4 P03/6
#T P03/7 P03/9 P04/5 P05/1 P05/2 P05/3 P06/1 P06/2 P06/3 P06/4 P06/5
#T P07/1 P07/2 P10/1 P10/2 P10/3 P11/1 P11/2
*** *** ***   Text font: element creation   *** *** ***


SR12. <Set text font> creates a "set text font" element (in the open structure), whose associated value is taken from the function's parameter.
#F 36
#D 7.3.2.4.1
#S 4.4.1/23/1 4.5.2/38/3
#T P01/1 P01/2
*** ***   Text font: effect during traversal   *** ***


SR13. Upon traversal of a "set text font" element, the current text font entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 36
#D 3.3.2 7.3.2.4.1
#S 4.5.2/38/3
#T P02/1 P02/2 P02/3 P02/4 P02/5 P02/6 P03/1 P03/2 P03/3 P03/4 P03/6
#T P03/8 P03/9 P05/1

SR14. Text fonts 1 and 2 both contain all the ASCII characters, i.e. those defined within ANSI X3.4-1986.
#F
#D 2.7
#S 4.5.5/47/4 4.5.5/48/5
#T P02/1 P02/2 P02/3 P02/4 P03/7 P03/8 P04/5 P06/1

SR15. Text fonts 1 and 2 are visually distinguishable.
#F
#D
#S 4.5.5/47/4 4.5.5/48/5
#T P02/5 P03/9

SR16. For all text fonts, a character body in TLC, before application of character up vector, is a rectangle generally surrounding the character, aligned such that the top, cap, half, base, and bottom lines are all parallel to the TLC x-axis and the left, centre, and right lines are all parallel to the TLC y-axis.
#F
#D
#S 4.5.5/48/6 4.5.5/48/7
#T P02/6 P03/6 P03/7 P08/1 P08/2 P08/3 P08/4 P09/1 P09/2 #C A small part of a kerned character may lie slightly outside
its character body.

SR17. All text fonts are either monospaced or proportionately spaced. All character bodies within a monospaced font have the same font nominal height and the same font nominal width. All character bodies within a proportionately spaced font have the same font nominal height.
#F
#D
#S 4.5.5/48/6
#T P02/6 P03/6 P03/7 #C In monospaced fonts, the nominal height need not equal the
nominal width. Font nominal height and width is the size, in
TLC, of the character bodies of a given font as set by the
character height and width aspects, before the application of
other text aspects and before the effect of the transformation
pipeline.

SR18. Text font 1 is monospaced.
#F
#D
#S 4.5.5/48/5 4.14/113/3
#T P02/6 P06/2 P06/3

SR19. A text font identifier denotes the same text font for all workstation types within a PHIGS implementation.
#F
#D 2.2 6.12.1.1 6.12.1.2
#S 4.5.5/48/5
#T P03/1 P03/2 P03/3 P03/4 #C While the same text font, such as Helvetica or Cyrillic, must
appear on all workstations, the aspect ratios of corresponding
characters may differ somewhat, according to 4.5.7/56/7.

SR20. If a requested character in a text primitive is not available within the font, an implementation dependent representation is generated to so indicate.
#F
#D
#S 4.5.5/47/4
#T P03/8

SR21. When a text primitive is displayed, if its bound text font and text precision are available on the workstation and its bound text font and text precision ASFs are INDIVIDUAL, then the appearance of the text font agrees with the implementor documentation and, if the text font is greater than 2, with the ISO register.
#F 36 266
#D 3.3.2 3.3.3 3.3.7 3.3.8 6.12.1.1 6.12.1.2
#S 4.1.1/15/1 4.1.2/15/2 4.5.2/39/7 4.5.5/44/10 4.5.5/47/4 4.5.5/48/6
#T P02/1 P02/2 P02/3 P02/4 P02/5 P03/1 P03/2 P03/3 P03/4 P03/5 P05/1 #C For registered fonts, the details of character shapes may be
set by the implementor, even though the basic character set is
specified.

SR22. When a text primitive is displayed, if its bound text font and text precision are not both available on the workstation and its bound text font and text precision ASFs are INDIVIDUAL, then text font 1 (as documented by the implementor) and text precision STRING are used to display the text.
#F 36 266
#D 3.3.2 3.3.3 3.3.7 3.3.8 6.12.1.1 6.12.1.2
#S 4.5.2/39/7 4.5.2/43/3 4.5.5/44/10
#T P03/9
*** *** ***   Text font: network traversal   *** *** ***


SR23. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current text font of the PTSL is set to 1.
#F
#D 2.12.2 3.3.2
#S 4.4.3/26/2 4.4.3/28/1 6.3/309/1
#T P05/1

SR24. As part of the PTSL, the current text font is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.2
#S 4.4.3/28/1
#T P05/1
*** ***   Text precision: element creation   *** ***


SR25. <Set text precision> creates a "set text precision" element (in the open structure), whose associated value is taken from the function's parameter.
#F 37
#D 7.3.2.4.2
#S 4.4.1/23/1 4.5.2/38/3
#T P01/3 P01/4

SR26. The valid values for text precision in <set text precision> are STRING, CHAR, and STROKE.
#F 37
#D 7.3.2.4.2
#S 4.5.5/47/5
#T P01/4 P02/1 P02/2 P02/3 P02/4 P02/5
*** ***   Text precision: effect during traversal   *** ***


SR27. Upon traversal of a "set text precision" element, the current text precision entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 37
#D 3.3.3 7.3.2.4.2
#S 4.5.2/38/3
#T P02/1 P02/2 P02/3 P02/4 P02/5 P03/9 P05/1 P06/2 P06/3 P06/4 P06/5
#T P08/1 P08/2 P08/3 P08/4 P09/1 P09/2 P11/1 P11/2

SR28. When a text primitive is displayed, if its bound text font and text precision are available on the workstation and its bound text font and text precision ASFs are INDIVIDUAL, then the appearance of the text primitive meets or exceeds the requirements of the bound text precision.
#F 37 266
#D 3.3.2 3.3.3 3.3.7 3.3.8 6.12.1.1 6.12.1.2
#S 4.5.2/39/7 4.5.5/44/10 4.5.5/48/5
#T P04/4 P05/1 P11/1 P11/2 #C A workstation may use a higher text precision for displaying
text than the one requested. SR22 above describes the effect of
unavailable font or precision.

SR29. For text precision = STRING, the text string as a whole is displayed with the appropriate text font and the nearest DC character height and character expansion factor available on the workstation, based on the first character in the text string.
#F 37
#D 6.12.1.3 6.12.1.4 6.12.1.5 6.12.1.6 6.12.1.7 6.12.1.8
#S 4.5.5/47/5 4.5.5/48/3 4.5.5/49/5
#T P03/2 P03/4 P04/4 #C In the case where STRING is used as a result of coercion from
an unavailable font and precision, then the actual font (1) may
differ from the requested font. See SRs below for details of
coercion of character height and expansion factor.

SR30. For text precision = CHAR, each character of the text is displayed with the requested text font and the nearest DC character height and character expansion factor available on the workstation. Character spacing and text alignment aspects are applied exactly.
#F 37
#D 6.12.1.3 6.12.1.4 6.12.1.5 6.12.1.6 6.12.1.7 6.12.1.8
#S 4.5.5/47/5 4.5.5/48/3 4.5.5/49/5
#T P03/2 P03/4 P04/4 #C See SRs below for details of coercion of character height and
expansion factor.

SR31. For text precision = STROKE, text is displayed with all text aspects applied exactly.
#F 37
#D
#S 4.5.5/48/1 4.5.5/49/5
#T P02/6 P03/6 P03/7 P06/1 P06/2 P06/3 P06/4 P06/5 P08/1 P08/2 P08/3
#T P08/4 P09/1 P09/2 P11/1 P11/2
*** *** ***   Text precision: network traversal   *** *** ***


SR32. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current text precision of the PTSL is set to STRING.
#F
#D 2.12.3 3.3.3
#S 4.4.3/26/2 4.4.3/28/1 6.3/309/1
#T P05/1

SR33. As part of the PTSL, the current text precision is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.3
#S 4.4.3/28/1
#T P05/1
*** ***   Character expansion: element creation   *** ***


SR34. <Set character expansion> creates a "set character expansion" element (in the open structure), whose associated value is taken from the function's parameter.
#F 38
#D 7.3.2.4.3
#S 4.4.1/23/1 4.5.2/38/3
#T P01/5 P01/6 P04/5
*** ***   Character expansion: effect during traversal   *** ***


SR35. Upon traversal of a "set character expansion factor" element, the current character expansion factor entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 38
#D 3.3.4 7.3.2.4.3
#S 4.5.2/38/3
#T P04/5 P05/2 P06/2 P06/3 P06/4 P06/5 P11/1 P11/2

SR36. The magnitude of the character expansion factor attribute specifies the amount by which the font nominal width/height ratio of individual TLC character bodies is multiplied to yield the actual TLC width/height ratio.
#F 269
#D
#S 4.5.5/45/2 4.5.5/45/4 5.4.2/138/6
#T P02/6 P03/6 P04/4 P04/5 P05/2 P06/2 P06/3 P06/4 P06/5 P11/1 P11/2

SR37. When a text primitive is displayed, if its bound character expansion factor ASF is INDIVIDUAL, then the actual DC character expansion factor used when displaying the text is the nearest available to the requested DC character expansion factor resulting from its bound TLC character expansion factor (after undergoing modelling, viewing and workstation transformations). The requested DC character expansion factor equals the requested DC width to height ratio times the character's font nominal height to width ratio.
#F 38 266
#D 3.3.4 3.3.9 6.12.1.6 6.12.1.7 6.12.1.8
#S 4.5.2/39/7 4.5.5/44/10 4.5.5/47/5 4.5.5/49/2 4.5.5/49/4 5.4.2/138/6
#T P04/4 P06/2 P06/3 P06/4 P06/5 #C See SRs above for derivation of requested DC character height
and width. Character expansion factor may be approximated only
for STRING or CHAR text precision; STROKE precision implies exact
realization. See the SRs on text precision, above. Of course,
by the above rule, if a requested expansion factor is available
on the workstation, then the result is exact for any precision.
Note also that requested DC expansion factor may well differ from
nominal TLC expansion factor, since it reflects both that nominal
factor and the effects of modelling and viewing transformation.
For instance, in the case of a horizontal text string, if the
nominal factor is 2.0 and a modelling transformation scales X
(but not Y) by 3.0, the effective requested DC expansion factor
will be 6.0.
*** *** ***   Character expansion: network traversal   *** *** ***


SR38. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current character expansion factor of the PTSL is set to 1.0.
#F
#D 2.12.4 3.3.4
#S 4.4.3/26/2 4.4.3/28/1 6.3/309/1
#T P05/2

SR39. As part of the PTSL, the current character expansion factor is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.4
#S 4.4.3/28/1
#T P05/2
*** ***   Character spacing: element creation   *** ***


SR40. <Set character spacing> creates a "set character spacing" element (in the open structure), whose associated value is taken from the function's parameter.
#F 39
#D 7.3.2.4.4
#S 4.4.1/23/1 4.5.2/38/3
#T P01/7 P01/8
*** ***   Character spacing: effect during traversal   *** ***


SR41. Upon traversal of a "set character spacing" element, the current character spacing entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 39
#D 3.3.5 7.3.2.4.4
#S 4.5.2/38/3
#T P05/2 P06/2 P06/3 P06/4 P06/5 P11/1 P11/2

SR42. Character spacing specifies the TLC distance (positive) or overlap (negative) between adjacent character bodies, expressed in units of the font nominal character height.
#F 269
#D
#S 4.5.5/45/3
#T P02/6 P03/6 P05/2 P06/2 P06/3 P06/4 P06/5 P11/1 P11/2

SR43. When a text primitive is displayed and its bound character spacing ASF is INDIVIDUAL, then the bound character spacing is used when displaying the text.
#F 39
#D 3.3.5 3.3.10
#S 4.5.2/39/7 4.5.5/44/10
#T P06/2 P06/3 P06/4 P06/5 #C Character spacing may be approximated only for STRING text
precision; CHAR or STROKE precision implies exact realization.
See the SRs on text precision, above.
*** *** ***   Character spacing: network traversal   *** *** ***


SR44. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current character spacing of the PTSL is set to 0.0.
#F
#D 2.12.5 3.3.5
#S 4.4.3/26/2 4.4.3/28/1 6.3/309/1
#T P05/2

SR45. As part of the PTSL, the current character spacing is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.5
#S 4.4.3/28/1
#T P05/2
***   Text colour index: element creation   ***


SR46. <Set text colour index> creates a "set text colour index" element (in the open structure), whose associated value is taken from the function's parameter.
#F 40
#D 7.3.2.4.5
#S 4.4.1/23/1 4.5.2/38/3
#T P01/9 P01/10 P07/1 P07/2
*** ***   Text colour index: effect during traversal   *** ***


SR47. Upon traversal of a "set text colour index" element, the current text colour index entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 40
#D 3.3.6 7.3.2.4.5
#S 4.5.2/38/3
#T P05/3 P07/1 P07/2

SR48. When text is displayed, if its bound text colour index is defined on the workstation and its bound text colour index ASF is INDIVIDUAL, then the text colour index is realized as itself.
#F 40
#D 3.3.6 3.3.11 5.15.3.1 5.15.3.2
#S 4.5.2/39/7 4.5.5/44/10 4.5.12/63/4
#T P05/3 P07/1

SR49. When text is displayed, if its bound text colour index is not defined on the workstation and its bound text colour index ASF is INDIVIDUAL, then the text colour index is realized as number 1.
#F 40
#D 3.3.6 3.3.11 5.15.3.1 5.15.3.2
#S 4.5.2/39/7 4.5.2/43/3 4.5.5/44/10
#T P07/2
*** ***   Text colour index: network traversal   *** ***


SR50. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current text colour index of the PTSL is set to 1.
#F
#D 2.12.6 3.3.6
#S 4.4.3/26/2 4.4.3/28/1 6.3/309/1
#T P05/3

SR51. As part of the PTSL, the current text colour index is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.6
#S 4.4.3/28/1
#T P05/3
*** ***   Character height: element creation   *** ***


SR52. <Set character height> creates a "set character height" element (in the open structure), whose associated value is taken from the function's parameter.
#F 41
#D 7.3.2.4.6
#S 4.4.1/23/1 4.5.2/38/3
#T P01/11 P01/12 P04/5
*** *** ***   Character Height Support   *** *** ***


SR53. <Inquire text facilities> describes the realizable character heights for a specified workstation type, via the number of available character heights, minimum character height and maximum character height.
#F 266
#D 6.12.1.6 6.12.1.7 6.12.1.8
#S
#T P04/1 P04/2 P04/3

SR54. The minimum character height and maximum character height are both positive.
#F 266
#D 6.12.1.7 6.12.1.8
#S 6.7/322/1
#T P04/2

SR55. All workstation types support at least one character height for STRING and CHAR precisions.
#F 266
#D 6.12.1.6
#S 4.14/114/2 6.7/322/1
#T P04/3

SR56. The range of character heights returned by <Inquire text facilities> is for font 1.
#F 266
#D 6.12.1.7 6.12.1.8
#S
#T P04/4

SR57. The workstation supports a continuous range of character heights for CHAR and STRING precision, if the number of available character heights is 0.
#F 266
#D 6.12.1.6
#S 6.7/322/1
#T P04/3 P04/4
*** ***   Character height: effect during traversal   *** ***


SR58. Upon traversal of a "set character height" element, the current character height entry in the PHIGS traversal state list (PTSL) is set to magnitude of the element's associated value.
#F 41
#D 3.3.12 7.3.2.4.6
#S 4.5.2/38/3
#T P03/7 P04/5 P06/2 P06/3 P06/4 P06/5 P10/1 P11/1 P11/2

SR59. The magnitude of the character height attribute specifies, in TLC, the font nominal height (from baseline to capline) of a capital letter.
#F 269
#D
#S 4.5.5/45/2 4.5.5/46/1 4.5.5/48/7 5.4.2/140/1
#T P02/6 P03/6 P03/7 P04/4 P04/5 P06/2 P06/3 P06/4 P06/5 P11/1 P11/2 #C Character height is measured in TLC, along the character up
vector. Since TLC is unscaled from modelling coordinates, the
magnitude of character height may also be treated as if in MC.

SR60. The font nominal width in TLC of a character within a text primitive is given by the font's intrinsic width to height ratio for that character times the magnitude of the character height.
#F
#D
#S 4.5.5/44/9 4.5.5/45/2 5.4.2/140/1
#T P02/6 P06/2 P06/3 P06/4 P06/5 P11/1 P11/2 #C Since <set character height> also sets the character width
attribute, character height is in effect a scaling factor for the
entire character.

SR61. When a text primitive is displayed, the actual DC character height is the nearest available to the requested DC character height resulting from its TLC bound character height (after undergoing modelling, viewing and workstation transformations).
#F 41 266
#D 3.3.12 6.12.1.3 6.12.1.4 6.12.1.5
#S 4.5.5/45/2 4.5.5/47/5 4.5.5/49/2 5.4.2/140/1
#T P04/4 P06/2 P06/3 P06/4 P06/5 #C See SRs above for derivation of requested DC character height
and width. Character height may be approximated only for STRING
or CHAR text precision; STROKE precision implies exact
realization, as stated in the SRs on text precision, above. Of
course, by the above rule, if a requested height is available on
the workstation, then the result is exact for any precision.
*** *** ***   Character height: network traversal   *** *** ***


SR62. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current character height and width of the PTSL are set to 0.01.
#F
#D 2.12.12 3.3.12
#S 4.4.3/26/2 4.4.3/28/1 4.5.5/47/2 6.3/309/1
#T P10/1

SR63. As part of the PTSL, the current character height and width are saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.12
#S 4.4.3/28/1
#T P10/1
*** ***   Text path: element creation   *** ***


SR64. <Set text path> creates a "set text path" element (in the open structure), whose associated value is taken from the function's parameter.
#F 43
#D 7.3.2.4.8
#S 4.4.1/23/1 4.5.2/38/3
#T P01/15 P01/16 P06/1

SR65. The valid values for text path in <set text path> are RIGHT, LEFT, UP, and DOWN.
#F 43
#D 7.3.2.4.8
#S 4.5.5/45/2
#T P01/16 P06/1 P08/1 P08/3
*** ***   Text path: effect during traversal   *** ***


SR66. Upon traversal of a "set text path" element, the current text path entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 43
#D 3.3.16 7.3.2.4.8
#S 4.5.2/38/3
#T P06/1 P06/2 P06/3 P06/4 P06/5 P08/1 P08/2 P08/3 P08/4 P09/1 P09/2
#T P10/3 P11/1 P11/2

SR67. The text path specifies the writing direction within the TLC text plane for the text string before application of the character up vector attribute (i.e. the direction in which successive characters are appended) as follows: RIGHT: positive x-axis. LEFT: negative x-axis. UP: positive y-axis. DOWN: negative x-axis.
#F 43
#D
#S 4.5.5/45/2
#T P06/1 P06/2 P06/3 P06/4 P06/5 P08/1 P08/2 P08/3 P08/4 P09/1 P09/2
#T P10/3 P11/1 P11/2 #C Only STROKE precision implies exact realization of text path.
See the SRs on text precision, above.

SR68. For vertical text paths (UP or DOWN), the centrelines of the character bodies are aligned vertically within the text string before application of the character up vector attribute.
#F 43
#D
#S 4.5.5/45/2
#T P06/3 P06/5 P09/2 P11/1 P11/2

SR69. For horizontal text paths (LEFT or RIGHT), the baselines of the character bodies are aligned horizontally within the text string before application of the character up vector attribute.
#F 43
#D
#S 4.5.5/45/2
#T P06/2 P06/4 P09/1 P11/1 P11/2
*** *** ***   Text path: network traversal   *** *** ***


SR70. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current text path of the PTSL is set to RIGHT.
#F
#D 2.12.16 3.3.16
#S 4.4.3/26/2 4.4.3/28/1 4.5.5/47/2 6.3/309/1
#T P10/3

SR71. As part of the PTSL, the current text path is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.16
#S 4.4.3/28/1
#T P10/3
*** ***   Text alignment: element creation   *** ***


SR72. <Set text alignment> creates a "set text alignment" element (in the open structure), whose associated value is taken from the function's parameter.
#F 44
#D 7.3.2.4.9
#S 4.4.1/23/1 4.5.2/38/3
#T P01/17 P01/18 P08/1 P08/2 P08/3 P08/4

SR73. The valid values in <set text alignment> for horizontal text alignment are NORMAL, LEFT, CENTRE, and RIGHT; for vertical text alignment, NORMAL, TOP, CAP, HALF, BASE, and BOTTOM.
#F 44
#D 7.3.2.4.9
#S 4.5.5/45/6 4.5.5/46/1
#T P01/18 P08/1 P08/2 P08/3 P08/4
*** ***   Text alignment: effect during traversal   *** ***


SR74. Upon traversal of a "set text alignment" element, the current text alignment entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 44
#D 3.3.17 3.3.18 7.3.2.4.9
#S 4.5.2/38/3
#T P08/1 P08/2 P08/3 P08/4 P09/1 P09/2 P10/2 P11/1 P11/2

SR75. The text alignment specifies which horizontal and vertical location within the text rectangle is to coincide with the TLC origin by shifting the text rectangle within the text plane. For all text paths, alignments LEFT, RIGHT, BOTTOM, and TOP refer to the left, right, bottom, and top edges of the rectangle, and CENTRE refers to the horizontal location midway between the left and right edges. For horizontal text paths, CAP, HALF, and BASE refer to the capline, halfline, and baseline of the whole text string. For vertical text paths, CAP refers to the capline of the topmost character, BASE refers to the baseline of the bottommost character, and HALF refers to the vertical location midway between the halflines of the topmost and bottommost characters.
#F 44
#D
#S 4.5.5/45/4 4.5.5/45/6 4.5.5/46/1
#T P03/7 P08/1 P08/2 P08/3 P08/4 P09/1 P09/2 P10/2 P11/1 P11/2 #C Only CHAR and STROKE precision imply exact realization of text
alignment. See the SRs on text precision, above. Recall that
the TLC origin is the text position in MC. Also, note the
implication that for a given font the relative placement of the
baseline, halfline, and capline of the same for all character
bodies.

SR76. The effect of NORMAL as the horizontal or vertical component of text alignment is equivalent to one of the other defined values for text alignment and depends on text path as follows: text path | (horizontal, vertical) -----------+------------------------ RIGHT | (LEFT, BASE) LEFT | (RIGHT, BASE) UP | (CENTRE, BASE) DOWN | (CENTRE, TOP)
#F 44
#D
#S 4.5.5/46/3 4.5.5/47/1
#T P08/2 P08/4
*** *** ***   Text alignment: network traversal   *** *** ***


SR77. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current text alignment of the PTSL is set to (NORMAL, NORMAL).
#F
#D 2.12.17 2.12.18 3.3.17 3.3.18
#S 4.4.3/26/2 4.4.3/28/1 4.5.5/47/2 6.3/309/1
#T P10/2

SR78. As part of the PTSL, the current text alignment is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.17 3.3.18
#S 4.4.3/28/1
#T P10/2
*** ***   Character up vector: element creation   *** ***


SR79. <Set character up vector> creates a "set character up vector" element (in the open structure), whose associated value is taken from the function's parameter.
#F 42
#D 7.3.2.4.7
#S 4.4.1/23/1 4.5.2/38/3
#T P01/13 P01/14 P06/1
*** ***   Character up vector: effect during traversal   *** ***


SR80. Upon traversal of a "set character up vector" element, the current character up vector entry in the PHIGS traversal state list (PTSL) is set to the element's associated value.
#F 42
#D 3.3.13 7.3.2.4.7
#S 4.5.2/38/3
#T P06/1 P09/1 P09/2 P10/3 P11/1 P11/2

SR81. The character up vector aspect (specified in TLC) causes the text rectangle that has been formed in the text plane by application of text font, character height, character expansion factor, character spacing, text path, and text alignment to be rotated within the text plane about the TLC origin such that the up direction of the characters is the same as that of the vector.
#F 42
#D
#S 4.5.5/45/2 4.5.5/45/5
#T P06/1 P09/1 P09/2 P10/3 P11/1 P11/2 #C Only STROKE precision implies exact realization of character
up vector. See the SRs on text precision, above.
*** *** ***   Character up vector: network traversal   *** *** ***


SR82. At the start of the top-level traversal of a structure network (not a sub-traversal caused by execute structure), the current character up vector of the PTSL is set to (0,1).
#F
#D 2.12.13 3.3.13
#S 4.4.3/26/2 4.4.3/28/1 4.5.5/47/2 6.3/309/1
#T P10/3

SR83. As part of the PTSL, the current character up vector is saved (but not changed) by execute structure and then, upon completion of the sub-traversal of the invoked network, restored to the saved value.
#F 113
#D 3.3.13
#S 4.4.3/28/1
#T P10/3


LOCAL DICTIONARY:

  Functions ---
  013: ptx3    <text 3>
  014: ptx     <text>
  036: pstxfn  <set text font>
  037: pstxpr  <set text precision>
  038: pschxp  <set character expansion factor>
  039: pschsp  <set character spacing>
  040: pstxci  <set text colour index>
  041: pschh   <set character height>
  042: pschup  <set character up vector>
  043: pstxp   <set text path>
  044: pstxal  <set text alignment>
  113: pexst   <execute structure>
  266: pqtxf   <inquire text facilities>
  269: pqtxx   <inquire text extent>
  303: pqcets  <inquire current element type and size>
  304: pqceco  <inquire current element content>
 
  Data Structures ---
  2  ...  phigs_description_table
  2.2  ...  list_of_available_workstation_types
  2.7  ...  list_of_available_character_sets
  2.12 ...  default_text_attributes
  2.12.2  ...  default_text_font
  2.12.3  ...  default_text_precision
  2.12.4  ...  default_character_expansion_factor
  2.12.5  ...  default_character_spacing
  2.12.6  ...  default_text_colour_index
  2.12.12 ...  default_character_height
  2.12.13 ...  default_character_up_vector
  2.12.16 ...  default_text_path
  2.12.17 ...  default_text_alignment_horizontal
  2.12.18 ...  default_text_alignment_vertical
  3  ...  phigs_traversal_state_list
  3.3  ...  current_text_attributes
  3.3.2  ...  current_text_font
  3.3.3  ...  current_text_precision
  3.3.4  ...  current_character_expansion_factor
  3.3.5  ...  current_character_spacing
  3.3.6  ...  current_text_colour_index
  3.3.7  ...  current_text_font_asf
  3.3.8  ...  current_text_precision_asf
  3.3.9  ...  current_character_expansion_factor_asf
  3.3.10 ...  current_character_spacing_asf
  3.3.11 ...  current_text_colour_index_asf
  3.3.12 ...  current_character_height
  3.3.13 ...  current_character_up_vector
  3.3.14 ...  current_character_width
  3.3.16 ...  current_text_path
  3.3.17 ...  current_text_alignment_horizontal
  3.3.18 ...  current_text_alignment_vertical
  5  ...  workstation_state_list
  5.15  ...  colour_entry
  5.15.3  ...  colour_table
  5.15.3.1  ...  colour_index
  5.15.3.2  ...  colour_specification
  6  ...  workstation_description_table
  6.12  ...  text_entry
  6.12.1  ...  text_facilities
  6.12.1.1  ...  number_of_text_font_and_precision_pairs
  6.12.1.2  ...  list_of_text_font_and_precision_pairs
  6.12.1.3  ...  number_of_available_character_heights
  6.12.1.4  ...  minimum_character_height
  6.12.1.5  ...  maximum_character_height
  6.12.1.6  ...  number_of_available_character_expansion_factors
  6.12.1.7  ...  minimum_character_expansion_factor
  6.12.1.8  ...  maximum_character_expansion_factor
  7  ...  structure_state_list
  7.3  ...  list_of_structure_elements
  7.3.1  ...  graphical_primitives
  7.3.1.5  ...  text_3
  7.3.1.6  ...  text
  7.3.2  ...  primitive_attributes
  7.3.2.4  ...  text_attributes
  7.3.2.4.1  ...  text_font
  7.3.2.4.2  ...  text_precision
  7.3.2.4.3  ...  character_expansion_factor
  7.3.2.4.4  ...  character_spacing
  7.3.2.4.5  ...  text_colour_index
  7.3.2.4.6  ...  character_height
  7.3.2.4.7  ...  character_up_vector
  7.3.2.4.8  ...  text_path
  7.3.2.4.9  ...  text_alignment
 
SEMANTIC CROSS-REFERENCES:
  04.01.03/SR09 04.01.03/SR10 04.01.03/SR11

LOCAL SUBROUTINES:

TSTASC accepts a prompt and a test string whose leading character
is NOT a member of the set being tested.  The rest of the string
has characters in the expected set.  The characters are displayed
in random order and the operator must identify the one which
doesn't belong to the set.

Logical function FPAVL determines whether a given font and
precision will be realized exactly as such on the workstation
type.  If a requested font is realized in a higher precision, it
is not considered to be directly available.

CHKFNT accepts a list of fonts and precisions, and randomly picks
some of them to be illustrated using the specified character
string.

UNREP displays some unrepresentable character codes in the
requested font and then reports whether these were correctly
identified by the operator.

TXEXAL returns not only the size of the nominal text extent
rectangle, but also the location within it of the various text
alignment positions.

TSCHUP draws a text string with various values for character up
and for text alignment.  The text strings are displayed along
radii of a circle and are enclosed by a text extent rectangle
(except for one which is deliberately drawn incorrectly).

LOCTXT draws a text string at the real y-location corresponding
to the integer index given in YLOC.

LOCTX1 draws a text string at the real y-location corresponding
to the integer index given in YLOC, scaled down by SCF.

LOCTX2 draws a text string at the real y-location corresponding
to the integer index given in YLOC, and puts a polymarker at the
text position.

INOUTL builds outlines for nominal text string "ELF" in
structures 201,202,203. The lower left corner of the character is
at 0,0 and its height and width = 1.  Note that height of
character *body* (from topline to bottomline) is usually greater
than height of character (from capline to baseline).

GEOTXT generates a display of several text primitives, whose
geometric aspects have been highly randomized.  It then outlines
their expected position, except for the one in line #NGLINE.



PROGRAM 1: Element creation and inquiring

You may inspect either the design or code for this program.


PROGRAM 2: Appearance of text fonts 1 and 2

You may inspect either the design or code for this program.


PROGRAM 3: Appearance of all text fonts

You may inspect either the design or code for this program.


PROGRAM 4: Character height and expansion factor

You may inspect either the design or code for this program.


PROGRAM 5: Network inheritance and initialization for non-geometric text attributes

You may inspect either the design or code for this program.


PROGRAM 6: Text path and character height, expansion factor, spacing, and up vector

You may inspect either the design or code for this program.


PROGRAM 7: Text color index

You may inspect either the design or code for this program.


PROGRAM 8: Text alignment

You may inspect either the design or code for this program.


PROGRAM 9: Character up vector

You may inspect either the design or code for this program.


PROGRAM 10: Network inheritance and initialization for geometric text attributes

You may inspect either the design or code for this program.


PROGRAM 11: Geometric interaction of text attributes

You may inspect either the design or code for this program.

End of documentation for 04.02.03.01