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


9.3 Font Attributes

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

Function: font-all-chars-exist-p font
exists-p

Type boolean.

Returns true if glyphs exist for all indexes in the range returned by font-min-char and font-max-char. Returns nil if an index in the range corresponds to empty glyph.

font

A font object.

Function: font-ascent font
ascent

Type int16.

Returns the vertical ascent of the font used for interline spacing. The ascent defines the nominal distance in pixels from the baseline to the bottom of the previous line of text. Some font glyphs may actually extend beyond the font ascent.

font

A font object.

Function: font-default-char font
index

Type card16.

Returns the index of the glyph drawn when an invalid or empty glyph index is specified. If the default index specifies an invalid or empty glyph, an invalid or empty index has no effect.

font

A font object.

Function: font-descent font
descent

Type int16.

Returns the vertical descent of the font used for interline spacing. The descent defines the nominal distance in pixels from the baseline to the top of the next line of text. Some font glyphs may actually extend beyond the font descent.

font

A font object.

Function: font-direction font
direction

Type draw-direction.

Returns the nominal drawing direction for the font. The font drawing direction is only a hint that indicates whether the char-width of most font glyphs is positive (:left-to-right direction) or negative (:right-to-left direction). Note that X does not provide any direct support for vertical text.

font

A font object.

Function: font-display font
font

A font object.

Returns the display object associated with the specified font.

display

Type display.

Function: font-equal font-1 font-2
font-1
font-2

The font objects.

Returns true if the two arguments refer to the same server resource and nil if they do not.

Function: font-id font
font

A font object.

Returns the unique resource ID assigned to the specified font.

id

Type resource-id.

Function: font-max-byte1 font
font

A font object.

Returns zero if the font uses linear index encoding. Otherwise, if the font uses matrix index encoding, a value between 1 and 255 is returned that specifies the maximum value for the most significant byte of font indexes.

max-byte1

Type card8.

Function: font-max-byte2 font
font

A font object.

Returns zero if the font uses linear index encoding. Otherwise, if the font uses matrix index encoding, a value between 1 and 255 is returned that specifies the maximum value for the least significant byte of font indexes.

max-byte2

Type card8.

Function: font-max-char font
font

A font object.

Returns the maximum valid value used for linear encoded indexes. This function is not meaningful for fonts that use matrix index encoding.

index

Type card16.

Function: font-min-byte1 font
font

A font object.

Returns zero if the font uses linear index encoding. Otherwise, if the font uses matrix index encoding, a value between 1 and 255 is returned that specifies the minimum value for the most significant byte of font indexes.

min-byte1

Type card8.

Function: font-min-byte2 font
font

A font object.

Returns zero if the font uses linear index encoding. Otherwise, if the font uses matrix index encoding, a value between 1 and 255 is returned that specifies the minimum value for the least significant byte of font indexes.

min-byte2

Type card8.

Function: font-min-char font
font

A font object.

Returns the minimum valid value used for linear encoded indexes. This function is not meaningful for fonts that use matrix index encoding.

index

Type card16.

Function: font-name font
font

A font object.

Returns the name of the font, or nil if font is a pseudo-font.

name

Type string or null.

Function: font-p font

Returns true if the argument is a font object and nil otherwise.

font-p

Type boolean.

Function: font-plist font
font

A font object.

Returns and (with setf) sets the property list for the specified font. This function provides a hook where extensions can add data.

plist

Type list.

Function: font-properties font
font

A font object.

Returns the list of font properties recorded by the X server. The returned list is a property list of keyword/value pairs. The set of possible font property keywords is implementation-dependent.

properties

Type list.

Function: font-property font name
font

A font object.

name

A font property keyword.

Returns the value of the font property specified by the name keyword. The property value, if it exists, is returned as an uninterpreted 32-bit integer.

property

Type int32 or null.

Function: max-char-ascent font
font

A font object.

Returns the maximum char-ascent value for all characters in font.

ascent

Type int16.

Function: max-char-attributes font
font

A font object.

Returns the maximum char-attributes value for all characters in font.

attributes

Type int16.

Function: max-char-descent font
font

A font object.

Returns the maximum char-descent value for all characters in font.

descent

Type int16.

Function: max-char-left-bearing font
font

A font object.

Returns the maximum char-left-bearing value for all characters in font.

left-bearing

Type int16.

Function: max-char-right-bearing font
font

A font object.

Returns the maximum char-right-bearing value for all characters in font.

right-bearing

Type int16.

Function: max-char-width font
font

A font object.

Returns the maximum char-width value for all characters in font.

width

Type int16.

Function: min-char-ascent font
font

A font object.

Returns the minimum char-ascent for all characters in font.

ascent

Type int16.

Function: min-char-attributes font
font

A font object.

Returns the minimum char-attributes for all characters in font.

attributes

Type int16.

Function: min-char-descent font
font

A font object.

Returns the minimum char-descent for all characters in font.

descent

Type int16.

Function: min-char-left-bearing font
font

A font object.

Returns the minimum char-left-bearing for all characters in font.

left-bearing

Type int16.

Function: min-char-right-bearing font
font

A font object.

Returns the minimum char-right-bearing for all characters in font.

right-bearing

Type int16.

Function: min-char-width font
font

A font object.

Returns the minimum char-width for all characters in font.

width

Type int16.


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