The measuring of text overset/underset in the current frame (text container) is available in Ted4 and Fred4, for the article elements, linked to pages, or containing local geometry. The measuring is displayed in the status bar, and it's accessible also through commands GetTextOverH, GetTextOverN, or through properties OverH and OverN of article's node object, or text object.
The measuring is also available as a color of the frame (text container) border: in the default configuration, the red color means "overset or underset", while blue color means "in measure". Please note that the such frames colors are a personal preference, so users can change them (see Frame border color and non-fitting values).
The leading used to to calculate an overset is the leading used on the beginning of the last paragraph in text, in other words:
•after a paragraph style (if any)
•after the tag >default< (if any)
•before any other tag or content
The computing is based on ENTIRE TEXT LINES, ignoring vertical shifts up/down produced by >jmp..<, >d...< or >u..< tags (while shifts produced by >ld..<, >eld..<, >a..< and >ta..< are not ignored).
The calculation goes as: Can one or more entire text lines fit into the frame? If Yes, the text is considered as underset – the frame color is red (default), the counter shows negative number, corresponding to the number of entire text lines. Is one or more lines entirely outside of frame? If yes, the text is considered as overset – the frame color is red (default), the counter shows positive number, corresponding again to the number of entire text lines.
The default text contains no styles and tags. If the text is empty, the counter shows the total negative number of entire lines in the default leading (defined in the format, assigned to the element), that will fit the frame. As soon as you add at least one character to the text (it means there's one line in the text!) the counter turns into a negative number of remaining lines in the default leading. |
The formatted text contains styles or tags, that may define leading, different than default. When the first paragraph is formatted with a paragraph style The behavior depends on the Global setting of the current format and whether you used paragraph styles or tags. The example assumes that the setting "Consider as non-empty lines..." in the Global section of the current text format is not checked. If the first paragraph is formatted with a paragraph style that sets type size and leading, the counter shows the total number of entire lines with the current leading, that will fit the frame. It assumes that the rest of the text will use the current leading. Should the setting "Consider as non-empty lines..." be checked, the first formatted line counts as 1 non-empty line even if you don't type anything, thus, the status bar would show 1 line less of underset. When the first paragraph is formatted with tags (no style) Should you use tags instead of paragraph style, the counter might be wrong, displaying the remaining number of lines in the default leading and not in the current leading. |
Under certain circumstances, the overset/underset measuring may produce partially unexpected results. For example, the below frame border is colored as "in measure" (default blue color), although text is visibly out of shape, and also bottom rule. The "fault" is of the >jmp..< tag, that causes vertical shift down of all that follows it. Such shift is non counted in the overset/underset computing (as are not counted the effects of >d..< and >u..< tags). |