summaryrefslogtreecommitdiff
path: root/devdocs/elisp/frame-font.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/frame-font.html')
-rw-r--r--devdocs/elisp/frame-font.html13
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>&amp;optional frame</em>
+</dt> <dt id="frame-char-width">Function: <strong>frame-char-width</strong> <em>&amp;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 &amp;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 &copy; 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>