DESCRIPTION: This module tests the behavior of the <inquire text extent> function. In the SR's, all references to text attributes refer to the parameters of the function, not to elements within the CSS or to text bundle tables. SEMANTIC REQUIREMENTS: *** *** *** Input parameters *** *** ***#F 269
SR1. Text font specifies which font of the given workstation type is used to generate the virtual text string from which the text extent rectangle is computed.
#F
SR2. For all text fonts, a character body in TLC 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
SR3. 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 269
SR4. Text font 1 is monospaced.
#F 269
SR5. For text font 1, the results are workstation independent.
#F 269
SR6. The magnitude of the character expansion factor 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
SR7. 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
SR8. The magnitude of the character height specifies, in TLC, the font nominal height (from baseline to capline) of a capital letter.
#F 269
SR9. 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 269
SR10. The text path specifies the writing direction within the TLC text plane for the text string (i.e. the direction in which successive character bodies are appended) as follows: RIGHT: positive x-axis, LEFT: negative x-axis, UP: positive y-axis, DOWN: negative x-axis.
#F 269
SR11. 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 269
SR12. 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)
*** *** *** Implicit text attributes *** *** ***#F 269
SR13. In <inquire text extent>, the implicit text position is (0,0), the implicit character up vector is (0,1), and the implicit text precision is STROKE.
#F 269
SR14. For text precision = STROKE, text is displayed with all text aspects applied exactly.
*** *** *** Output parameters *** *** ***#F 269
SR15. For horizontal text paths, the left (right) edge of the text extent rectangle (expressed in TLC) coincides with the left (right) edge of the leftmost (rightmost) character of the text string, as it would be generated for the implicit and specified attributes and workstation type. Its top and bottom edges coincide with the top and bottom edges of the character bodies.
#F 269
SR16. For vertical text paths, the top (bottom) edge of the text extent rectangle (expressed in TLC) coincides with the top (bottom) edge of the topmost (bottommost) character of the text string, as it would be generated for the implicit and specified attributes and workstation type. Its width is the width of the widest character body within the font as determined by character height and as modified by the character expansion factor parameter. Its left and right edges are equidistant from the centreline along which the character bodies are aligned.
#F 269
SR17. The location of the concatenation point (CP), expressed in TLC, for zero character spacing depends on text path as follows: ------------------------------------------------------------------- text path | horizontal-CP vertical-CP -----------+------------------------------------------------------- RIGHT | right edge of text extent text-position (zero) LEFT | left edge of text extent text-position (zero) DOWN | text-position (zero) bottom edge of text extent UP | text-position (zero) baseline of next character
#F 269
SR18. The location of the concatenation point includes character spacing after the last character in text string in the direction of the TEXT PATH.
LOCAL DICTIONARY:
Functions --- 269: pqtxx <inquire text extent> Data Structures --- 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.2.1 ... text_font_and_precision_pair SEMANTIC CROSS-REFERENCES: 02.03.03/SR15 LOCAL SUBROUTINES: The programs in this module use the following subroutines: CHTXRC: Computes expected results for various parameter values which affect the size of the text extent rectangle and the concatenation point. Computation is based on deviation from nominal width and length of entire string. Therefore, CHTXRC may be used for non-monospaced fonts. CHMONO: Computes expected results for various parameter values which affect the size of the text extent rectangle and the concatenation point. Computation is based on deviation from nominal character size in text path dimension and thickness of entire string in other dimension. Therefore, CHMONO is valid only when every character in the string has the same size. TXCOMP: Compares actual and expected values for results of <inquire text extent> and reports results in two logical variables. TXCOMP tests both text paths for the given orientation, i.e. LEFT and RIGHT for horizontal, UP and DOWN for vertical.
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.