emacs-devel
[Top][All Lists]
Advanced

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

Re: Fringes again


From: Kim F. Storm
Subject: Re: Fringes again
Date: 26 May 2002 01:06:47 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

Simon Josefsson <address@hidden> writes:

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

IMO, reducing the fringe width below 8 pixels really doesn't make sense.
But if you want the minimum fringe width (i.e. half the width of the
default face width), simply set both widths to 1.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk




reply via email to

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