Fonts
As with the color type, the font type allows X11 fonts to be
manipulated by Lisp code.
Returns t if arg is a font object.
|
Sawfish supports two types of fonts: X11 core fonts (fontsets and
fontstructs) and Xft fonts. Calling code must look up fonts by
giving both a name and a type: an "xlfd" argument indicates the
core fonts, and "Xft" indicates Xft fonts. These types are
always literal strings.
| font-type-exists-p type
|
Function |
|
Returns true if fonts with the type described by the string type
can be loaded, false otherwise.
|
| get-font-typed type name
|
Function |
Return a font object representing the X11 font specified by the string
name. Argument type indicates the type of font to look
for; it must be one of the strings "xlfd" for a X11 core fonts
(based on fontsets or a fontstructs), or "Xft" for an Xft font.
Signals an error if type is not one of the literal strings
listed above. Also signals an error if no font named name
can be found within the requested type.
|
|
Return a font object representing the X11 core font (fontset or
fontstruct) specified by the string name.
Signals an error if no font named name is available among the
X11 core fonts.
|
Several functions allow the attributes associated with a font object to
be found.
|
Returns the name of the X11 font represented by object font (a
string).
|
Returns a string indicating the font's class. This is "xlfd"
for X11 core fonts, or "Xft" for Xft fonts.
|
| font-height font
|
Function |
|
Returns the bounding height of glyphs in the font represented by object
font.
|
| font-ascent &optional font
|
Function |
|
Returns the ascent of glyphs rendered using the font represented by
font. If no font argument is given, use the default font.
|
| font-descent &optional font
|
Function |
|
Returns the descent of glyphs rendered using the font represented by
font. If no font argument is given, use the default font.
|
| text-width string &optional font
|
Function |
Returns the number of horizontal pixels that would be required to
display the text string using font object font (or the
value of the default-font variable if font is undefined).
|
As with colors, a default font may be specified, to be used where no
other font is specified.
|
Font object used when no other font has been specified.
|
Fonts can have Lisp properties associated with them (similar to the
property lists associated with symbols). Currently these aren't
actually used by the window manager.
| font-put font property value
|
Function |
|
Associate the lisp object value with the property named by the
symbol property of the font object font.
|
| font-get font property
|
Function |
Return the value of the property named by the symbol property of
the font font, or nil if no such property exists.
|
| fonts-are-fontsets
|
Variable |
True if the X fonts in use are fontsets. This will be false if
setlocale fails, or returns an ASCII locale, or if X doesn't
support the locale.
|