diff options
Diffstat (limited to 'devdocs/elisp/font-lookup.html')
| -rw-r--r-- | devdocs/elisp/font-lookup.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/devdocs/elisp/font-lookup.html b/devdocs/elisp/font-lookup.html new file mode 100644 index 00000000..ea2b854a --- /dev/null +++ b/devdocs/elisp/font-lookup.html @@ -0,0 +1,17 @@ + <h4 class="subsection">Looking Up Fonts</h4> <dl> <dt id="x-list-fonts">Function: <strong>x-list-fonts</strong> <em>name &optional reference-face frame maximum width</em> +</dt> <dd> +<p>This function returns a list of available font names that match <var>name</var>. <var>name</var> should be a string containing a font name in either the Fontconfig, GTK+, or XLFD format (see <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Fonts.html#Fonts">Fonts</a> in <cite>The GNU Emacs Manual</cite>). Within an XLFD string, wildcard characters may be used: the ‘<samp>*</samp>’ character matches any substring, and the ‘<samp>?</samp>’ character matches any single character. Case is ignored when matching font names. </p> <p>If the optional arguments <var>reference-face</var> and <var>frame</var> are specified, the returned list includes only fonts that are the same size as <var>reference-face</var> (a face name) currently is on the frame <var>frame</var>. </p> <p>The optional argument <var>maximum</var> sets a limit on how many fonts to return. If it is non-<code>nil</code>, then the return value is truncated after the first <var>maximum</var> matching fonts. Specifying a small value for <var>maximum</var> can make this function much faster, in cases where many fonts match the pattern. </p> <p>The optional argument <var>width</var> specifies a desired font width. If it is non-<code>nil</code>, the function only returns those fonts whose characters are (on average) <var>width</var> times as wide as <var>reference-face</var>. </p> +</dd> +</dl> <dl> <dt id="x-family-fonts">Function: <strong>x-family-fonts</strong> <em>&optional family frame</em> +</dt> <dd> +<p>This function returns a list describing the available fonts for family <var>family</var> on <var>frame</var>. If <var>family</var> is omitted or <code>nil</code>, this list applies to all families, and therefore, it contains all available fonts. Otherwise, <var>family</var> must be a string; it may contain the wildcards ‘<samp>?</samp>’ and ‘<samp>*</samp>’. </p> <p>The list describes the display that <var>frame</var> is on; if <var>frame</var> is omitted or <code>nil</code>, it applies to the selected frame’s display (see <a href="input-focus">Input Focus</a>). </p> <p>Each element in the list is a vector of the following form: </p> <div class="example"> <pre class="example">[<var>family</var> <var>width</var> <var>point-size</var> <var>weight</var> <var>slant</var> + <var>fixed-p</var> <var>full</var> <var>registry-and-encoding</var>] +</pre> +</div> <p>The first five elements correspond to face attributes; if you specify these attributes for a face, it will use this font. </p> <p>The last three elements give additional information about the font. <var>fixed-p</var> is non-<code>nil</code> if the font is fixed-pitch. <var>full</var> is the full name of the font, and <var>registry-and-encoding</var> is a string giving the registry and encoding of the font. </p> +</dd> +</dl><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> + <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Font-Lookup.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Font-Lookup.html</a> + </p> +</div> |
