emacs-devel
[Top][All Lists]
Advanced

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

Re: Fringes again


From: Simon Josefsson
Subject: Re: Fringes again
Date: Sat, 25 May 2002 01:48:53 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i686-pc-linux-gnu)

address@hidden (Kim F. Storm) writes:

> 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)

Hm.  Will this work for e.g. `default-frame-alist'?  It need to have
integers, not expressions that can vary depending on the font or
display (consider multi-head X where the screens has different
resolutions, `frame-char-width' would probably return different values
depending on which screen it is on).  It doesn't look very reliable to
calculate "half fringe width" (if there isn't something better than
the above), so perhaps the "half width" option should be removed.
Opinions?




reply via email to

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