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 *** *** ***#F 13 14
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
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.
*** *** *** Text in Device Coordinates *** *** ***#F 41
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
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
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
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
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
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.
*** *** *** Text attribute inquiry *** *** ***#F 303
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 304
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.
*** *** *** Text attribute traversal binding *** *** ***#F 36-44
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.
*** *** *** Text font: element creation *** *** ***#F 36
SR12. <Set text font> creates a "set text font" element (in the open structure), whose associated value is taken from the function's parameter.
*** *** Text font: effect during traversal *** ***#F 36
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
SR14. Text fonts 1 and 2 both contain all the ASCII characters, i.e. those defined within ANSI X3.4-1986.
#F
SR15. Text fonts 1 and 2 are visually distinguishable.
#F
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
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
SR18. Text font 1 is monospaced.
#F
SR19. A text font identifier denotes the same text font for all workstation types within a PHIGS implementation.
#F
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 36 266
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
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.
*** *** *** Text font: network traversal *** *** ***#F
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 113
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.
*** *** Text precision: element creation *** ***#F 37
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
SR26. The valid values for text precision in <set text precision> are STRING, CHAR, and STROKE.
*** *** Text precision: effect during traversal *** ***#F 37
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 266
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
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
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
SR31. For text precision = STROKE, text is displayed with all text aspects applied exactly.
*** *** *** Text precision: network traversal *** *** ***#F
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 113
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.
*** *** Character expansion: element creation *** ***#F 38
SR34. <Set character expansion> creates a "set character expansion" element (in the open structure), whose associated value is taken from the function's parameter.
*** *** Character expansion: effect during traversal *** ***#F 38
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 269
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 38 266
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.
*** *** *** Character expansion: network traversal *** *** ***#F
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 113
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.
*** *** Character spacing: element creation *** ***#F 39
SR40. <Set character spacing> creates a "set character spacing" element (in the open structure), whose associated value is taken from the function's parameter.
*** *** Character spacing: effect during traversal *** ***#F 39
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 269
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 39
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.
*** *** *** Character spacing: network traversal *** *** ***#F
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 113
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.
*** Text colour index: element creation ***#F 40
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.
*** *** Text colour index: effect during traversal *** ***#F 40
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
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
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.
*** *** Text colour index: network traversal *** ***#F
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 113
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.
*** *** Character height: element creation *** ***#F 41
SR52. <Set character height> creates a "set character height" element (in the open structure), whose associated value is taken from the function's parameter.
*** *** *** Character Height Support *** *** ***#F 266
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
SR54. The minimum character height and maximum character height are both positive.
#F 266
SR55. All workstation types support at least one character height for STRING and CHAR precisions.
#F 266
SR56. The range of character heights returned by <Inquire text facilities> is for font 1.
#F 266
SR57. The workstation supports a continuous range of character heights for CHAR and STRING precision, if the number of available character heights is 0.
*** *** Character height: effect during traversal *** ***#F 41
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 269
SR59. The magnitude of the character height attribute specifies, in TLC, the font nominal height (from baseline to capline) of a capital letter.
#F
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 41 266
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).
*** *** *** Character height: network traversal *** *** ***#F
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 113
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.
*** *** Text path: element creation *** ***#F 43
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
SR65. The valid values for text path in <set text path> are RIGHT, LEFT, UP, and DOWN.
*** *** Text path: effect during traversal *** ***#F 43
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
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
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
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.
*** *** *** Text path: network traversal *** *** ***#F
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 113
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.
*** *** Text alignment: element creation *** ***#F 44
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
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.
*** *** Text alignment: effect during traversal *** ***#F 44
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
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
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)
*** *** *** Text alignment: network traversal *** *** ***#F
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 113
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.
*** *** Character up vector: element creation *** ***#F 42
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.
*** *** Character up vector: effect during traversal *** ***#F 42
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
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.
*** *** *** Character up vector: network traversal *** *** ***#F
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 113
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.
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.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.
You may inspect either the design or code for this program.