From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Fringes again
Date: 25 May 2002 01:00:15 +0200 [thread overview]
Message-ID: <5xsn4hdudc.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <ilu4rgxri6x.fsf@latte.josefsson.org>
Simon Josefsson <jas@extundo.com> writes:
> >> I have one remaining question: How do you find out the default fringe
> >> width? Right now it is hard coded to 10.
> >
> > I thought (without having looked at the code) it was 8 pixels rounded
> > up to a multiple of the width of a character in the default font.
>
Actually, the default is to take 2x8 = 16 pixels and find the minimum
number of characters in the default font that is at least 16 pixels wide,
and then distribute that space evenly between the two fringes.
Suppose the default font width is 6 pixels. This needs 3 characters =
18 pixels to hold the fringes => 9 pixels for each fringe.
If an odd number of pixels are allocated, the extra pixel is
added to the right fringe.
> Right, but how do you programmatically calculate that?
Something like
(/ (* (/ (+ (* 2 8) (frame-char-width) -1)
(frame-char-width))
(frame-char-width))
2)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2002-05-24 23:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-20 20:03 Fringes again Simon Josefsson
2002-05-20 23:37 ` Miles Bader
2002-05-21 19:12 ` Richard Stallman
2002-05-21 20:53 ` Simon Josefsson
2002-05-21 21:40 ` Thien-Thi Nguyen
2002-05-22 8:20 ` Simon Josefsson
2002-05-22 1:24 ` Miles Bader
2002-05-22 3:21 ` Eli Zaretskii
2002-05-22 3:40 ` Miles Bader
2002-05-22 8:54 ` Simon Josefsson
2002-05-24 0:07 ` Miles Bader
2002-05-24 9:47 ` Simon Josefsson
2002-05-24 23:00 ` Kim F. Storm [this message]
2002-05-24 23:48 ` Simon Josefsson
2002-05-25 23:06 ` Kim F. Storm
2002-05-25 23:15 ` Simon Josefsson
2002-05-21 15:57 ` Richard Stallman
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=5xsn4hdudc.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--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.