PEXQueryEncodedTextExtents - Query Encoded Text Extents (5.0)


Synopsis

 
  PEXTextExtent *PEXQueryEncodedTextExtents(
        Display *display,
        XID resource_id,
        unsigned int font_table_index,
        int path,
        double expansion,
        double spacing,
        double height,
        int halign,
        int valign,
        unsigned long count,
        PEXListOfEncodedText *encoded_text
  ) 

Arguments

display
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id
The resource identifier of either a renderer, a workstation or a text font table.

font_table_index
The text font table index.

path
The text path (PEXPathRight, PEXPathLeft, PEXPathUp or PEXPathDown).

expansion
The text character expansion factor.

spacing
The text character spacing factor.

height
The text character height.

halign
The text horizontal text alignment (PEXHAlignNormal, PEXHAlignLeft, PEXHAlignCenter or PEXHAlignRight).

valign
The text vertical text alignment (PEXVAlignNormal, PEXVAlignTop, PEXVAlignCap, PEXVAlignHalf, PEXVAlignBase or PEXVAlignBottom).

count
The number of encoded text strings.

encoded_text
An array of encoded text strings.

Returns

An array of text extents; a null pointer if unsuccessful.

Description

Invoke PEXQueryEncodedTextExtents which is similar to PEXQueryTextExtents, except that this function specifies multiple encoded text strings.

With this function, each text string in the encoded text list has a character set, a character set width, an encoding state, and a list of characters. (See PEXEncodedTextData).

The current font group is taken to be that entry of the Text Font lookup table associated with the resource_id selected by the font_table_index. The character set is an index into the current font group. Font groups have individual fonts which are numbered starting at one; a value of three selects the third font in the font group currently being used. If a character set of any of the encoded text strings is not available in the current font group, then the default font group is used for the array of encoded text strings. If a character set value is not available in the default font group, then the result is implementation-dependent. The character set width indicates the number of bytes per glyph in each encoded string. PEXlib defines three values for character set width: PEXCSByte, PEXCSShort and PEXCSLong. PEXlib provides the encoding state for your use but the PEX implementation does not interpret the encoding state.

All other aspects of this function are the same as PEXQueryTextExtents.

Errors

BadMatch
The specified resource identifier identifies a table of a type other than a text font table.

BadValue
A specified value for one or more text attributes is invalid, or the specified resource identifier does not identify a valid renderer, workstation or lookup table resource.

See Also

For a list of PEX Font functions and related topics, see PEX Fonts.