GNU bug report logs -
#18789
24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font
Previous Next
Reported by: Anders Lindgren <andlind <at> gmail.com>
Date: Wed, 22 Oct 2014 09:04:01 UTC
Severity: normal
Found in version 24.4
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 18789 <at> debbugs.gnu.org (full text, mbox):
> Under MS-Windows, it appears that the width of the frame only can be a
> multiple of the character width. Unfortunately, the width of the fringes
> and scrollbars used by side-by-side windows does not always add up to full
> characters -- if you use a font other than the default. The effect is that
> when using side-by-side windows, you could get a partial column. (Partial
> columns are not desirable, for example, they work differently when you
> place the cursor on the end of a full line.)
In order to obtain pixelwise resizing you have to set
`frame-resize-pixelwise' to a non-nil-value. Please do that.
> Steps to repeat 1:
> emacs -q
>
> Switch to *scratch*: C-x b RET
>
> Evaluate:
> (set-default-font
> (create-fontset-from-ascii-font
> "-raster-Terminal-bold-r-normal-normal-8-60-96-96-c-*-ms-oemlatin"))
>
> Split the window using: C-x 3
>
> Insert a long line: C-u 37 x
>
> Here, the cursor is at the end of the line in the left window, it is
> rendered in the right fringe. (OK)
>
> Go to the other window: C-x o
>
> Place the cursor at the end: C-x >
>
> Here, the cursor is visible in the partially visible column. (NOT OK)
Sorry. Such problems can't be avoided, even without fringes and scroll
bars, when the window size is not a multiple of the size of the default
font. However, you can always calculate your "ideal" frame size based
on the number of side-by-side windows and the widths of the font, the
scroll bars and the fringes. Provided `frame-resize-pixelwise' is
non-nil, `set-frame-width' should then make the frame fit this size.
> Steps to repeat 2:
>
> emacs -q
>
> Evaluate the following:
>
> (set-frame-width (selected-frame) 607 nil t)
> (frame-pixel-width)
>
> Here, 632 is returned.
>
> (set-frame-width (selected-frame) 608 nil t)
> (frame-pixel-width)
>
> Here, 640 is returned. Clearly, the width of the frame is always a
> multiple of the character width.
Here on windows XP doing
(setq frame-resize-pixelwise t)
(set-frame-width (selected-frame) 607 nil t)
(frame-text-width)
yields 607 and
(setq frame-resize-pixelwise t)
(set-frame-width (selected-frame) 608 nil t)
(frame-text-width)
yields 608, as expected.
martin
This bug report was last modified 10 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.