emacs-devel
[Top][All Lists]
Advanced

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

Determining size of a propertised string


From: Elias Mårtenson
Subject: Determining size of a propertised string
Date: Tue, 29 Nov 2016 18:39:12 +0800

I have a string with a buch of properties applied (the main one: It uses a different font). I now need to split the window, making the size of the window just large enough to contain this text. If the string is not propertised, I can simply count the number of lines in the text I'll be inserting into the buffer and pass that as the HEIGHT parameter to ‘split-window’. But since the font used in this text is larger than the default font, the window becomes slightly too small.

As far as I can tell, there seems to be no standard way of determining what height to use in order to fit a given string. Is there a correct way to handle this?

The context of this is the C-c C-k feature in gnu-apl-mode. It is used to open a window that displays the APL keymap. It's common to use a slightly larger font for APL since each character is important, and that makes this problem immediately visible.

reply via email to

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