From: martin rudalics <rudalics@gmx.at>
To: Anders Lindgren <andlind@gmail.com>, 18789@debbugs.gnu.org
Subject: bug#18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font
Date: Wed, 22 Oct 2014 15:43:01 +0200 [thread overview]
Message-ID: <5447B465.600@gmx.at> (raw)
In-Reply-To: <CABr8ebZGV8Fg5bEkWBHKdcAu3dKJiuf9Qy=1iiGn28BeL+rF=Q@mail.gmail.com>
> 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
next prev parent reply other threads:[~2014-10-22 13:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 9:03 bug#18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font Anders Lindgren
2014-10-22 13:43 ` martin rudalics [this message]
2014-10-22 14:59 ` Eli Zaretskii
[not found] ` <CABr8ebbsGU4y6Se_uKbWJt-oWhrZ0vtXQQvjHdyOTzCE4Ct8nA@mail.gmail.com>
2015-01-04 18:10 ` 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=5447B465.600@gmx.at \
--to=rudalics@gmx.at \
--cc=18789@debbugs.gnu.org \
--cc=andlind@gmail.com \
/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.