Next: , Previous: , Up: Manipulating Glyphs   [Contents][Index]


50.4.2 Glyph Convenience Functions

The following functions are provided for working with specific properties of a glyph. Note that these are exactly like calling the general functions described above and passing in the appropriate value for property.

Remember that if you want to determine the “value” of a specific glyph property, you probably want to use the *-instance functions. For example, to determine whether a glyph contributes to its line height, use glyph-contrib-p-instance, not glyph-contrib-p. (The latter will return a boolean specifier or a list of specifications, and you probably aren’t concerned with these.)

Function: glyph-image glyph &optional locale

This function is equivalent to calling glyph-property with a property of image. The return value will be an image specifier if locale is nil or omitted; otherwise, it will be a specification or list of specifications.

Function: set-glyph-image glyph spec &optional locale tag-set how-to-add

This function is equivalent to calling set-glyph-property with a property of image.

Function: glyph-image-instance glyph &optional domain default no-fallback

This function returns the instance of glyph’s image in the given domain, and is equivalent to calling glyph-property-instance with a property of image. The return value will be an image instance.

Normally domain will be a window or nil (meaning the selected window), and an instance object describing how the image appears in that particular window and buffer will be returned.

Function: glyph-contrib-p glyph &optional locale

This function is equivalent to calling glyph-property with a property of contrib-p. The return value will be a boolean specifier if locale is nil or omitted; otherwise, it will be a specification or list of specifications.

Function: set-glyph-contrib-p glyph spec &optional locale tag-set how-to-add

This function is equivalent to calling set-glyph-property with a property of contrib-p.

Function: glyph-contrib-p-instance glyph &optional domain default no-fallback

This function returns whether the glyph contributes to its line height in the given domain, and is equivalent to calling glyph-property-instance with a property of contrib-p. The return value will be either nil or t. (Normally domain will be a window or nil, meaning the selected window.)

Function: glyph-baseline glyph &optional locale

This function is equivalent to calling glyph-property with a property of baseline. The return value will be a specifier if locale is nil or omitted; otherwise, it will be a specification or list of specifications.

Function: set-glyph-baseline glyph spec &optional locale tag-set how-to-add

This function is equivalent to calling set-glyph-property with a property of baseline.

Function: glyph-baseline-instance glyph &optional domain default no-fallback

This function returns the instance of glyph’s baseline value in the given domain, and is equivalent to calling glyph-property-instance with a property of baseline. The return value will be an integer or nil.

Normally domain will be a window or nil (meaning the selected window), and an instance object describing the baseline value appears in that particular window and buffer will be returned.

Function: glyph-face glyph

This function returns the face of glyph. (Remember, this is not a specifier, but a simple property.)

Function: set-glyph-face glyph face

This function changes the face of glyph to face.


Next: , Previous: , Up: Manipulating Glyphs   [Contents][Index]