emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Implement functions for measuring fonts and max chars per li


From: Perry E. Metzger
Subject: Re: [PATCH] Implement functions for measuring fonts and max chars per line
Date: Sat, 17 Jan 2015 15:38:39 -0500

On Sat, 17 Jan 2015 10:13:27 -0800 Titus von der Malsburg
<address@hidden> wrote:
> +** A new function `default-font-width' returns the average width
> of a +character in the current buffer's default font.  If the
> default face +is remapped (see `face-remapping-alist'), the value
> for the remapped +face is returned.  This function complements the
> existing function +`default-font-height'.
> +
> +** New functions `window-font-height' and `window-font-width return
> +the height and average width of characters in a specified face and
> +window.  If FACE is remapped (see `face-remapping-alist'), the
> +function returns the information for the remapped face.
> +
> +** A new function `window-max-chars-per-line' returns the maximal
> +number of characters that can be displayed on one line.  If a face
> +and/or window are provided, these values are used for the
> +calculation.  This function is different from `window-body-width'
> in +that it accounts for (i) continuation glyphs, (ii) the size of
> the +font, and (iii) the specified window.

This all brings to mind: is there a good way now to determine what
the maximum number of lines in a frame would be in a given font on
the user's display?

Perry
-- 
Perry E. Metzger                address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]