diff options
author | Titus von der Malsburg <malsburg@posteo.de> | 2022-04-29 15:14:09 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-04-29 15:14:09 +0200 |
commit | 91418d27e9c528fd9062c74a4ce58b657366a8c5 (patch) | |
tree | a3086a3164d75c103ac812c34dd1f7e114e09450 /doc/lispref/display.texi | |
parent | fa52782f5c4eaef7138534766dfc8a29465785b2 (diff) | |
download | emacs-91418d27e9c528fd9062c74a4ce58b657366a8c5.tar.gz emacs-91418d27e9c528fd9062c74a4ce58b657366a8c5.tar.bz2 emacs-91418d27e9c528fd9062c74a4ce58b657366a8c5.zip |
Add new functions for computing character metrics for windows
* doc/lispref/display.texi (Size of Displayed Text): Document the
char functions.
* doc/lispref/windows.texi (Window Sizes): Document
window-max-characters-per-line.
* lisp/window.el (window-char-pixel-width)
(window-char-pixel-height)
(window-max-characters-per-line): New functions (bug#19395).
Diffstat (limited to 'doc/lispref/display.texi')
-rw-r--r-- | doc/lispref/display.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index becf7ecd157..390d1650253 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2252,6 +2252,20 @@ This is a convenience function that uses @code{window-text-pixel-size} to compute the width of @var{string} (in pixels). @end defun +@defun window-char-pixel-width &optional window face +Return the average character width for the font used by @var{face} in +@var{window}. If @var{face} is @code{nil} or omitted, the +@code{default} face is used. If @var{windows} is @code{nil} or +omitted, the currently selected window is used. +@end defun + +@defun window-char-pixel-height &optional window face +Return the average character height for the font used by @var{face} in +@var{window}. If @var{face} is @code{nil} or omitted, the +@code{default} face is used. If @var{windows} is @code{nil} or +omitted, the currently selected window is used. +@end defun + @defun line-pixel-height This function returns the height in pixels of the line at point in the selected window. The value includes the line spacing of the line |