all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Determining size of a propertised string
@ 2016-11-29 10:39 Elias Mårtenson
  2016-11-29 11:00 ` martin rudalics
  0 siblings, 1 reply; 4+ messages in thread
From: Elias Mårtenson @ 2016-11-29 10:39 UTC (permalink / raw
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-29 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 10:39 Determining size of a propertised string Elias Mårtenson
2016-11-29 11:00 ` martin rudalics
2016-11-29 11:05   ` Elias Mårtenson
2016-11-29 14:16     ` martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.