From: "Elias Mårtenson" <lokedhs@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Determining size of a propertised string
Date: Tue, 29 Nov 2016 18:39:12 +0800 [thread overview]
Message-ID: <CADtN0WJfobeZkejvHOB9oX58GOfyWsU2HxwK5XgtaPhjtwFM1A@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2016-11-29 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 10:39 Elias Mårtenson [this message]
2016-11-29 11:00 ` Determining size of a propertised string martin rudalics
2016-11-29 11:05 ` Elias Mårtenson
2016-11-29 14:16 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADtN0WJfobeZkejvHOB9oX58GOfyWsU2HxwK5XgtaPhjtwFM1A@mail.gmail.com \
--to=lokedhs@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.