Starting with Emacs 23, fonts are specified by their name, size and optional properties. The format for specifying fonts comes from the fontconfig library used in modern Free desktops:
The old XLFD based format is also supported for backwards compatibility.
Emacs 23 and later supports a number of font backends. Currently,
uniscribe backends are supported on Windows.
gdi font backend is available on all versions of Windows,
and supports all fonts that are natively supported by Windows. The
uniscribe font backend is available on Windows 2000 and later,
and supports TrueType and OpenType fonts. Some languages requiring
complex layout can only be properly supported by the Uniscribe
backend. By default, both backends are enabled if supported, with
uniscribe taking priority over
gdi. To override that
and use the GDI backend even if Uniscribe is available, invoke Emacs
with the -xrm Emacs.fontBackend:gdi command-line argument, or
Emacs.fontBackend resource with the value
the Registry under either the
‘HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs’ or the
‘HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs’ key (see Resources).
Optional properties common to all font backends on MS-Windows are:
blackcan be specified without
weight=(e.g., Courier New-12:bold). Otherwise, the weight should be a numeric value between 100 and 900, or one of the named weights in
font-weight-table. If unspecified, a regular font is assumed.
obliquecan be specified without
slant=(e.g., Courier New-12:italic). Otherwise, the slant should be a numeric value, or one of the named slants in
font-slant-table. On Windows, any slant above 150 is treated as italics, and anything below as roman.
decorativeare recognized. These are most useful as a fallback with the font family left unspecified.
pspacing specifies a proportional font, and
cspecify a monospaced font.
rasterfor bitmapped fonts,
outlinefor scalable fonts, or
unknownif the type cannot be determined as one of those.
Options specific to
The following scripts are recognized on Windows:
nonemeans no antialiasing,
standardmeans use standard antialiasing,
subpixelmeans use subpixel antialiasing (known as Cleartype on Windows), and
naturalmeans use subpixel antialiasing with adjusted spacing between letters. If unspecified, the font will use the system default antialiasing.