Text Attributes


For an overview, see Primitives and Attributes.

Two types of text primitives are supported: regular text and annotation text. The server renders regular text primitives in an arbitrary 3D plane, while annotation text appears parallel to the view surface. See Annotation Text Attributes for annotation text primitives and attributes.

A text string is a list of characters rendered at a particular location in three-dimensional space. The server defines text positions in modeling coordinates and transforms them into screen coordinates within the rendering pipeline. When your application enables depth-cueing, the text color is affected by the depth-cueing computation. However, a text string has no surface from which to reflect light, therefore, the light-source illumination stage of the rendering pipeline has no effect on text.

The attributes that affect regular text primitives are:

 
--------------------------------------------------------------------------------------------------
Character Height OC                PEXOCCSetCharHeight
Character Up Vector OC (ASF)       PEXOCCSetCharUpVector
Text Alignment OC (ASF)            PEXOCCSetTextAlignment
Text Path OC                       PEXOCCSetTextPath
Text Bundle Index OC               PEXOCCSetTextBundleIndex
     Character Expansion OC (ASF)  PEXOCCSetCharExpansion
     Character Spacing OC (ASF)    PEXOCCSetCharSpacing
     Text Color OC (ASF)           PEXOCCSetTextColor
     Text Color Index OC (ASF)     PEXOCCSetTextColorIndex
     Text Font Index OC (ASF)      PEXOCCSetTextFontIndex
     Text Precision OC (ASF)       PEXOCCSetTextPrecision
Text Bundle Table RA               Text Bundle Table (LUT) and
                                      Text Bundle Table (Renderer)
Text Font Table RA                 Text Font Table (LUT) and
                                      Text Font Table (Renderer)
--------------------------------------------------------------------------------------------------

The PEXlib text primitives affected by the above attributes include:

 
----------------------------------------------------------------------------
Encoded Text 3D  PEXOCCEncodedText
Encoded Text 2D  PEXOCCEncodedText2D
Text 3D          PEXOCCText
Text 2D          PEXOCCText2D
----------------------------------------------------------------------------
 

See the sections referenced above for information about each of the text primitives and the attributes that affect them.

Clipping of Text
Clipping of text strings is dependent on the text precision attribute. If the text precision is PEXStringPrecision, then clipping is done in an implementation-dependent way. If the text precision is PEXCharPrecision, then clipping is done on at least a character-by-character basis. If the text precision is PEXStrokePrecision, then each character is clipped to the clipping boundaries.

HLHSR (Hidden Line/ Hidden Surface Removal) of Text
The treatment of text strings during hidden surface computations depends on the HLHSR (Hidden Line/Hidden Surface Removal) mode you select and its implementation. Z-buffer algorithms usually perform the hidden surface computation on the 2D realization of the text string. Scan-line algorithms may determine visibility for text strings solely from the 3D positions of each string.

Text Bundle Index and Aspect Source Flag
Whenever you render a text primitive, each of the text attributes is obtained directly from the current pipeline state or indirectly from a text bundle lookup table. Your application determines the source for the attribute by the current settings of the corresponding text aspect source flag or ASF's. If your application sets the attributes's ASF to the value PEXIndividual, then your application obtains the attribute value directly from the current pipeline state. If your application sets an attribute's ASF to the value PEXBundled, then your application obtains the attribute value from the current text bundle table. The text bundle index attribute indicates the text bundle table entry to be used. The ASF attributes are defined exactly as they are for PHIGS. Examples of the functionality and use of each is found in the PHIGS specification document. (See PHIGS functional specification, ISO/IEC 9592-1:1988, section 4.5.5)