GNU bug report logs -
#16306
24.3.50; font change creates blank column on Lucid
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16306 in the body.
You can then email your comments to 16306 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 02:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 31 Dec 2013 02:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Steps to reproduce:
1. $ emacs -Q &
2. (set-frame-font "Courier-18") C-j
Then a blank column is created on the right edge of the frame (i.e.,
to the right of the right fringe).
I can reproduce it if Emacs is compiled with the Lucid widgets
support, but not for GTK+ or non-toolkit builds.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
In GNU Emacs 24.3.50.1 (i386-apple-darwin13.0.0, X toolkit, Xaw3d scroll bars)
of 2013-12-31 on YAMAMOTO-no-MacBook-Air.local
Bzr revision: 115814 dancol <at> dancol.org-20131230232707-q2l921i5t5m0et5d
Windowing system distributor `The X.Org Foundation', version 11.0.11404000
Configured using:
`configure --with-jpeg=no --with-gif=no --with-tiff=no'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 08:06:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 31 Dec 2013 11:27:36 +0900
> From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
>
> Steps to reproduce:
>
> 1. $ emacs -Q &
> 2. (set-frame-font "Courier-18") C-j
>
> Then a blank column is created on the right edge of the frame (i.e.,
> to the right of the right fringe).
>
> I can reproduce it if Emacs is compiled with the Lucid widgets
> support, but not for GTK+ or non-toolkit builds.
Is the frame resized as result of changing the font, or do the frame
dimensions stay fixed?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 09:50:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 16306 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Tue, 31 Dec 2013 10:05:33 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>> Date: Tue, 31 Dec 2013 11:27:36 +0900
>> From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
>>
>> Steps to reproduce:
>>
>> 1. $ emacs -Q &
>> 2. (set-frame-font "Courier-18") C-j
>>
>> Then a blank column is created on the right edge of the frame (i.e.,
>> to the right of the right fringe).
>>
>> I can reproduce it if Emacs is compiled with the Lucid widgets
>> support, but not for GTK+ or non-toolkit builds.
> Is the frame resized as result of changing the font, or do the frame
> dimensions stay fixed?
Resized. Evaluation of (frame-pixel-width) gives different results
between Lucid and non-toolkit:
Lucid, showing blank column:
(list (frame-width) (frame-pixel-width)) => (80 674)
(set-frame-font "Courier-18")
(list (frame-width) (frame-pixel-width)) => (79 1162)
Non-toolkit, not showing blank column:
(list (frame-width) (frame-pixel-width)) => (80 674)
(set-frame-font "Courier-18")
(list (frame-width) (frame-pixel-width)) => (80 1166)
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 10:00:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 31 Dec 2013 18:48:57 +0900
> From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
> Cc: 16306 <at> debbugs.gnu.org
>
> >>>>> On Tue, 31 Dec 2013 10:05:33 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>
> >> 1. $ emacs -Q &
> >> 2. (set-frame-font "Courier-18") C-j
> >>
> >> Then a blank column is created on the right edge of the frame (i.e.,
> >> to the right of the right fringe).
> >>
> >> I can reproduce it if Emacs is compiled with the Lucid widgets
> >> support, but not for GTK+ or non-toolkit builds.
>
> > Is the frame resized as result of changing the font, or do the frame
> > dimensions stay fixed?
>
> Resized. Evaluation of (frame-pixel-width) gives different results
> between Lucid and non-toolkit:
>
> Lucid, showing blank column:
> (list (frame-width) (frame-pixel-width)) => (80 674)
> (set-frame-font "Courier-18")
> (list (frame-width) (frame-pixel-width)) => (79 1162)
>
> Non-toolkit, not showing blank column:
> (list (frame-width) (frame-pixel-width)) => (80 674)
> (set-frame-font "Courier-18")
> (list (frame-width) (frame-pixel-width)) => (80 1166)
Thanks. Can you show the screenshot of the problem, with some text
nearby to allow to judge the size of the blank column?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 11:35:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> Resized. Evaluation of (frame-pixel-width) gives different results
> between Lucid and non-toolkit:
Is it better now? I had some shelved fixes and couldn't
reproduce it so I installed them.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 11:52:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 16306 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Tue, 31 Dec 2013 12:33:45 +0100, martin rudalics <rudalics <at> gmx.at> said:
>> Resized. Evaluation of (frame-pixel-width) gives different results
>> between Lucid and non-toolkit:
> Is it better now? I had some shelved fixes and couldn't reproduce
> it so I installed them.
It no longer shows a blank column. But for the Lucid case, the value
of (frame-width) is reduced from 80 to 79 (and 80th column is
partially shown) when I change the frame font to Courier-18.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
Lucid:
(list (frame-width) (frame-pixel-width))
=> (80 674)
(+ (* (frame-char-width) 80) (frame-fringe-width)
(frame-scroll-bar-width)
(* (frame-parameter nil 'internal-border-width) 2))
=> 674
(set-frame-font "Courier-18")
(list (frame-width) (frame-pixel-width))
=> (79 1162)
(+ (* (frame-char-width) 80) (frame-fringe-width)
(frame-scroll-bar-width)
(* (frame-parameter nil 'internal-border-width) 2))
=> 1166
Non-toolkit:
(list (frame-width) (frame-pixel-width))
=> (80 674)
(+ (* (frame-char-width) 80) (frame-fringe-width)
(frame-scroll-bar-width)
(* (frame-parameter nil 'internal-border-width) 2))
=> 674
(set-frame-font "Courier-18")
(list (frame-width) (frame-pixel-width))
=> (80 1166)
(+ (* (frame-char-width) 80) (frame-fringe-width)
(frame-scroll-bar-width)
(* (frame-parameter nil 'internal-border-width) 2))
=> 1166
GTK+:
(list (frame-width) (frame-pixel-width))
=> (80 672)
(+ (* (frame-char-width) 80) (frame-fringe-width)
(frame-scroll-bar-width)
(* (frame-parameter nil 'internal-border-width) 2))
=> 672
(set-frame-font "Courier-18")
(list (frame-width) (frame-pixel-width))
=> (80 1164)
(+ (* (frame-char-width) 80) (frame-fringe-width)
(frame-scroll-bar-width)
(* (frame-parameter nil 'internal-border-width) 2))
=> 1164
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 17:53:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> It no longer shows a blank column. But for the Lucid case, the value
> of (frame-width) is reduced from 80 to 79 (and 80th column is
> partially shown) when I change the frame font to Courier-18.
I can't repeat that here, neither with Lucid nor with Motif.
> Lucid:
> (list (frame-width) (frame-pixel-width))
> => (80 674)
=> (80 756) here
> (+ (* (frame-char-width) 80) (frame-fringe-width)
> (frame-scroll-bar-width)
> (* (frame-parameter nil 'internal-border-width) 2))
> => 674
=> 756
> (set-frame-font "Courier-18")
> (list (frame-width) (frame-pixel-width))
> => (79 1162)
=> (80 1248)
> (+ (* (frame-char-width) 80) (frame-fringe-width)
> (frame-scroll-bar-width)
> (* (frame-parameter nil 'internal-border-width) 2))
> => 1166
=> 1248
Can you tell me what
(list
(* (frame-char-width) 80)
(frame-fringe-width)
(frame-scroll-bar-width)
(* (frame-parameter nil 'internal-border-width) 2))
gives on your system? Here it's (720 18 16 2) before and (1200 30 16 2)
after the font change.
In any case, please have a look at x_new_font - maybe there's some
blatant error you can spot immediately. I have no idea how changing the
font is supposed to change the size of the scrollbars.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 18:06:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 16306 <at> debbugs.gnu.org (full text, mbox):
Hi.
31 dec 2013 kl. 18:52 skrev martin rudalics <rudalics <at> gmx.at>:
> In any case, please have a look at x_new_font - maybe there's some
> blatant error you can spot immediately. I have no idea how changing the
> font is supposed to change the size of the scrollbars.
The native scroll bar is the same width as a character. Not sure if the pixelwise resize changed that.
Jan D.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Tue, 31 Dec 2013 18:59:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> The native scroll bar is the same width as a character. Not sure if the pixelwise resize changed that.
Can you tell me how this is processed in this part of x_new_font of
Emacs 24.3? I'm too silly to understand its semantics.
/* Compute the scroll bar width in character columns. */
if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
{
int wid = FRAME_COLUMN_WIDTH (f);
FRAME_CONFIG_SCROLL_BAR_COLS (f)
= (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + wid-1) / wid;
}
else
{
int wid = FRAME_COLUMN_WIDTH (f);
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
}
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Wed, 01 Jan 2014 04:53:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 16306 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Tue, 31 Dec 2013 18:52:28 +0100, martin rudalics <rudalics <at> gmx.at> said:
>> It no longer shows a blank column. But for the Lucid case, the value
>> of (frame-width) is reduced from 80 to 79 (and 80th column is
>> partially shown) when I change the frame font to Courier-18.
> I can't repeat that here, neither with Lucid nor with Motif.
It seems that the behavior depends on the window manager. The
original report was with quartz-wm, the default one for X11 on OS X.
The value of (list (frame-width) (frame-pixel-width)) there was
(80 674) ;; before (set-frame-font "Courier-18")
(79 1162) ;; after (set-frame-font "Courier-18")
but with twm, it becomes
(80 674) ;; before (set-frame-font "Courier-18")
(80 1166) ;; after (set-frame-font "Courier-18")
The latter looks similar to yours.
> Can you tell me what
> (list
> (* (frame-char-width) 80)
> (frame-fringe-width)
> (frame-scroll-bar-width)
> (* (frame-parameter nil 'internal-border-width) 2))
> gives on your system? Here it's (720 18 16 2) before and (1200 30 16 2)
> after the font change.
On my system, (640 16 16 2) before and (1120 28 16 2) after the font
change.
Probably we should wait for reports on other window managers, in case
it is a bug in quartz-wm.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Wed, 01 Jan 2014 11:10:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> On my system, (640 16 16 2) before and (1120 28 16 2) after the font
> change.
28 for the fringe width doesn't look right, this should be 30 since a
character is 15 pixels wide with the new font. So there could be a bug
in compute_fringe_widths, a function I never touched. But this still
would not explain a difference of four pixels.
Could you try starting with GDB in x_new_font and tell me which value of
"width" is passed to x_set_window_size_1 and how the latter calculates
"pixelwidth" which it passes to XResizeWindow?
And please also try the following patch (as mentioned earlier I never
understood that calculation and what the value "14" is supposed to
accomplish). For me it doesn't change anything - maybe it does for you.
martin
=== modified file 'src/xterm.c'
--- src/xterm.c 2013-12-31 09:48:54 +0000
+++ src/xterm.c 2014-01-01 10:01:19 +0000
@@ -7704,10 +7704,8 @@
}
else
{
- int wid = FRAME_COLUMN_WIDTH (f);
-
- FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = 14;
- FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
+ FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = FRAME_COLUMN_WIDTH (f);
+ FRAME_CONFIG_SCROLL_BAR_COLS (f) = 1;
}
if (FRAME_X_WINDOW (f) != 0)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Thu, 02 Jan 2014 05:38:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 16306 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 01 Jan 2014 12:09:39 +0100, martin rudalics <rudalics <at> gmx.at> said:
>> On my system, (640 16 16 2) before and (1120 28 16 2) after the
>> font change.
> 28 for the fringe width doesn't look right, this should be 30 since
> a character is 15 pixels wide with the new font. So there could be
> a bug in compute_fringe_widths, a function I never touched. But
> this still would not explain a difference of four pixels.
There is actually nothing wrong with the calculation of the fringe
width, because the character width for the new font (Courier-18) is 14
on my side (14 * 80 = 1120).
> Could you try starting with GDB in x_new_font and tell me which
> value of "width" is passed to x_set_window_size_1 and how the latter
> calculates "pixelwidth" which it passes to XResizeWindow?
The value of "width" is 1120 as of the entry to x_set_window_size_1,
and the value of "pixelwidth" is 1166 at the call to XResizeWindow.
It is the window manager "quartz-wm" that reduces the width from 1166
to 1162, probably because it respects the size hint that was set in
update_wm_hints (in widget.c). There, the value of base_width/height
is calculated using the width/height of the frame *before* resizing.
> And please also try the following patch (as mentioned earlier I
> never understood that calculation and what the value "14" is
> supposed to accomplish). For me it doesn't change anything - maybe
> it does for you.
It doesn't change the behavior for me, either.
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Thu, 02 Jan 2014 18:14:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> It is the window manager "quartz-wm" that reduces the width from 1166
> to 1162, probably because it respects the size hint that was set in
> update_wm_hints (in widget.c). There, the value of base_width/height
> is calculated using the width/height of the frame *before* resizing.
What rôle does base_width play here? If it prevailed, we could never
resize a frame to any size but the present one.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Sun, 05 Jan 2014 05:09:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 16306 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 01 Jan 2014 13:51:54 +0900, YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp> said:
>> Can you tell me what
>> (list
>> (* (frame-char-width) 80)
>> (frame-fringe-width)
>> (frame-scroll-bar-width)
>> (* (frame-parameter nil 'internal-border-width) 2))
>> gives on your system? Here it's (720 18 16 2) before and (1200 30 16 2)
>> after the font change.
> On my system, (640 16 16 2) before and (1120 28 16 2) after the font
> change.
> Probably we should wait for reports on other window managers, in case
> it is a bug in quartz-wm.
I tried with the "metacity" window manager on Ubuntu 12.04 LTS and
CentOS 5.10, and the results were much like what I got with
"quartz-wm" (i.e., (frame-width) is reduced from 80 to 79).
YAMAMOTO Mitsuharu
mituharu <at> math.s.chiba-u.ac.jp
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Sun, 05 Jan 2014 10:39:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 16306 <at> debbugs.gnu.org (full text, mbox):
> I tried with the "metacity" window manager on Ubuntu 12.04 LTS and
> CentOS 5.10, and the results were much like what I got with
> "quartz-wm" (i.e., (frame-width) is reduced from 80 to 79).
If it's the size hints as you suspected earlier, the problem should go
away if you set `frame-resize-pixelwise' to non-nil. Otherwise, you
would have to tell me how the new value of `frame-width' gets calculated
in the case at hand.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16306
; Package
emacs
.
(Sat, 02 Nov 2019 16:16:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 16306 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
>> I tried with the "metacity" window manager on Ubuntu 12.04 LTS and
>> CentOS 5.10, and the results were much like what I got with
>> "quartz-wm" (i.e., (frame-width) is reduced from 80 to 79).
>
> If it's the size hints as you suspected earlier, the problem should go
> away if you set `frame-resize-pixelwise' to non-nil. Otherwise, you
> would have to tell me how the new value of `frame-width' gets calculated
> in the case at hand.
I tried reproducing this problem in Debian with whatever the window
manager is in Gnome, and was unable to. So perhaps this has been fixed?
In any case, a workaround exists, and more information was requested
five years ago, so I doubt there'll be any further progress here, so I'm
closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
16306 <at> debbugs.gnu.org and YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 02 Nov 2019 16:16:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Dec 2019 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.