diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/frame-font.html | |
new repository
Diffstat (limited to 'devdocs/elisp/frame-font.html')
| -rw-r--r-- | devdocs/elisp/frame-font.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/devdocs/elisp/frame-font.html b/devdocs/elisp/frame-font.html new file mode 100644 index 00000000..9511c894 --- /dev/null +++ b/devdocs/elisp/frame-font.html @@ -0,0 +1,13 @@ + <h4 class="subsection">Frame Font</h4> <p>Each frame has a <em>default font</em> which specifies the default character size for that frame. This size is meant when retrieving or changing the size of a frame in terms of columns or lines (see <a href="size-parameters">Size Parameters</a>). It is also used when resizing (see <a href="window-sizes">Window Sizes</a>) or splitting (see <a href="splitting-windows">Splitting Windows</a>) windows. </p> <p>The terms <em>line height</em> and <em>canonical character height</em> are sometimes used instead of “default character height”. Similarly, the terms <em>column width</em> and <em>canonical character width</em> are used instead of “default character width”. </p> <dl> <dt id="frame-char-height">Function: <strong>frame-char-height</strong> <em>&optional frame</em> +</dt> <dt id="frame-char-width">Function: <strong>frame-char-width</strong> <em>&optional frame</em> +</dt> <dd><p>These functions return the default height and width of a character in <var>frame</var>, measured in pixels. Together, these values establish the size of the default font on <var>frame</var>. The values depend on the choice of font for <var>frame</var>, see <a href="font-and-color-parameters">Font and Color Parameters</a>. </p></dd> +</dl> <p>The default font can be also set directly with the following function: </p> <dl> <dt id="set-frame-font">Command: <strong>set-frame-font</strong> <em>font &optional keep-size frames</em> +</dt> <dd> +<p>This sets the default font to <var>font</var>. When called interactively, it prompts for the name of a font, and uses that font on the selected frame. When called from Lisp, <var>font</var> should be a font name (a string), a font object, font entity, or a font spec. </p> <p>If the optional argument <var>keep-size</var> is <code>nil</code>, this keeps the number of frame lines and columns fixed. (If non-<code>nil</code>, the option <code>frame-inhibit-implied-resize</code> described in the next section will override this.) If <var>keep-size</var> is non-<code>nil</code> (or with a prefix argument), it tries to keep the size of the display area of the current frame fixed by adjusting the number of lines and columns. </p> <p>If the optional argument <var>frames</var> is <code>nil</code>, this applies the font to the selected frame only. If <var>frames</var> is non-<code>nil</code>, it should be a list of frames to act upon, or <code>t</code> meaning all existing and all future graphical frames. </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/Frame-Font.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Frame-Font.html</a> + </p> +</div> |
