Next Prev Up

8.5 Chracter Attributes

The following paragraphs describe the CLX functions used to access the attributes of individual font glyphs.


char-ascent font index Function
     
font
A font object.
index
An int16 font index.

Returns the vertical distance in pixels from the baseline to the top of the given font glyph. Returns nil if the index is invalid or specifies an empty glyph, or if the font is a pseudo-font.

ascent
Type int16 or null.

char-attributes font index Function
     
font
A font object.
index
An int16 font index.

Returns font-specific attributes of the given glyph. The interpretation of such attributes is server-dependent. Returns nil if the index is invalid or specifies an empty glyph, or if the font is a pseudo-font.

attributes
Type int16 or null.

char-descent font index Function
     
font
A font object.
index
An int16 font index.

Returns the vertical distance in pixels from the baseline to the bottom of the given font glyph. Returns nil if the index is invalid or specifies an empty glyph, or if the font is a pseudo-font.

descent
Type int16 or null.

char-left-bearing font index Function
     
font
A font object.
index
An int16 font index.

Returns the left side bearing of the given font glyph. If draw-glyph is called with horizontal position x, the leftmost pixel of the glyph is drawn at the position (+ x  left-bearing). Returns nil if the index is invalid or specifies an empty glyph, or if the font is a pseudo-font.

left-bearing
Type int16 or null.

char-right-bearing font index Function
     
font
A font object.
index
An int16 font index.

Returns the right side bearing of the given font glyph. If draw-glyph is called with horizontal position x, the rightmost pixel of the glyph is drawn at the position (+  x  rightbearing). Returns nil if the index is invalid or specifies an empty glyph, or if the font is a pseudo-font.

right-bearing
Type int16 or null.

char-width font index Function
     
font
A font object.
index
An int16 font index.

Returns the width of the given font glyph. The width is defined to be equal to (- rightbearing left-bearing ). Returns nil if the index is invalid or specifies an empty glyph, or if the font is a pseudo-font.

width
Type int16 or null.

Next Prev Up
© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997