Next: , Previous: , Up: Font and Characters   [Contents][Index]


9.4 Chracter Attributes

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

Function: char-ascent font index
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.

Function: char-attributes font index
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.

Function: char-descent font index
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.

Function: char-left-bearing font index
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.

Function: char-right-bearing font index
font

A font object.

index

An int16 font index.

Returns the right side bearing of the given font glyph. If ndraw-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.

Function: char-width font index
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: , Previous: , Up: Font and Characters   [Contents][Index]