unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3005: 23.0.92; w32term.c: width of hbar cursor on a wide character
@ 2009-04-16  0:02 ` Yu-ji Hosokawa
  2009-04-16 15:20   ` Drew Adams
  2009-04-19 15:20   ` bug#3005: marked as done (23.0.92; w32term.c: width of hbar cursor on a wide character) Emacs bug Tracking System
  0 siblings, 2 replies; 4+ messages in thread
From: Yu-ji Hosokawa @ 2009-04-16  0:02 UTC (permalink / raw)
  To: emacs-pretest-bug

[-- Attachment #1: Type: Text/Plain, Size: 2230 bytes --]

Hello,

The width of HBAR cursor on a wide character is narrower than the
character width.
On Emacs 22.3, HBAR cursor width and the underlying character width
were the same. It is a desirable view, I think.

I'm so sorry I'm poor in English. I worry about whether you
understand my English.
Please see attached image, "23_0_92.png" and "22_3.png".

If it is not intentional change, what about the patch below?

thanks,
--yu


$ cvs diff -pu src/w32term.c
Index: src/w32term.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32term.c,v
retrieving revision 1.323
diff -p -u -r1.323 w32term.c
--- src/w32term.c       22 Mar 2009 02:39:30 -0000      1.323
+++ src/w32term.c       15 Apr 2009 22:10:02 -0000
@@ -5025,7 +5025,7 @@ x_draw_bar_cursor (w, row, width, kind)
          w32_fill_area (f, hdc, cursor_color, x,
                         WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
                                                  row->height - width),
-                        min (FRAME_COLUMN_WIDTH (f), cursor_glyph->pixel_width),
+                        cursor_glyph->pixel_width,
                         width);
        }



In GNU Emacs 23.0.92.1 (i386-mingw-nt5.1.2600)
 of 2009-04-16 on ASPIRIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -I/cygdrive/c/Users/yu-ji/src/GnuWin32/DLL'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: JPN
  value of $XMODIFIERS: nil
  locale-coding-system: cp932
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p - e - b <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

[-- Attachment #2: 23_0_92.png --]
[-- Type: Image/Png, Size: 8374 bytes --]

[-- Attachment #3: 22_3.png --]
[-- Type: Image/Png, Size: 8346 bytes --]

[-- Attachment #4: sample_text.txt --]
[-- Type: Text/Plain, Size: 261 bytes --]

(emacs-version)
=> "GNU Emacs 23.0.92.1 (i386-mingw-nt5.1.2600)
 of 2009-04-15 on ASPIRIN"

(setq cursor-type '(hbar . 5))
=> (hbar . 5)

あいうえお あいうえお Japanese Hirakana
TAB	TAB
" " japanese-jisx0208 Japanese IDEOGRAPHIC SPACE #x3000

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#3005: 23.0.92; w32term.c: width of hbar cursor on a wide character
  2009-04-16  0:02 ` bug#3005: 23.0.92; w32term.c: width of hbar cursor on a wide character Yu-ji Hosokawa
@ 2009-04-16 15:20   ` Drew Adams
  2009-04-16 22:02     ` Yu-ji Hosokawa
  2009-04-19 15:20   ` bug#3005: marked as done (23.0.92; w32term.c: width of hbar cursor on a wide character) Emacs bug Tracking System
  1 sibling, 1 reply; 4+ messages in thread
From: Drew Adams @ 2009-04-16 15:20 UTC (permalink / raw)
  To: 'Yu-ji Hosokawa', 3005, emacs-pretest-bug

> From: Yu-ji Hosokawa Sent: Wednesday, April 15, 2009 5:03 PM
> The width of HBAR cursor on a wide character is narrower than the
> character width.
> On Emacs 22.3, HBAR cursor width and the underlying character width
> were the same. It is a desirable view, I think.

See bug #1258.







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#3005: 23.0.92; w32term.c: width of hbar cursor on a wide character
  2009-04-16 15:20   ` Drew Adams
@ 2009-04-16 22:02     ` Yu-ji Hosokawa
  0 siblings, 0 replies; 4+ messages in thread
From: Yu-ji Hosokawa @ 2009-04-16 22:02 UTC (permalink / raw)
  To: drew.adams; +Cc: emacs-pretest-bug, 3005

Hello,

>> From: Yu-ji Hosokawa Sent: Wednesday, April 15, 2009 5:03 PM
>> The width of HBAR cursor on a wide character is narrower than the
>> character width.
>> On Emacs 22.3, HBAR cursor width and the underlying character width
>> were the same. It is a desirable view, I think.
> 
> See bug #1258.

Thank you for the info.
Again patch. How about the following?
It works fine for me. but I noticed that even if it patched, still
not relieve composed form character width.

thanks,
--yu



$ cvs diff -pu src/w32term.c
Index: src/w32term.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32term.c,v
retrieving revision 1.323
diff -p -u -r1.323 w32term.c
--- src/w32term.c       22 Mar 2009 02:39:30 -0000      1.323
+++ src/w32term.c       16 Apr 2009 21:38:49 -0000
@@ -4971,6 +4971,7 @@ x_draw_bar_cursor (w, row, width, kind)
   struct frame *f = XFRAME (w->frame);
   struct glyph *cursor_glyph;
   int x;
+  int hbar_width;
   HDC hdc;

   /* If cursor is out of bounds, don't draw garbage.  This can happen
@@ -5022,10 +5023,16 @@ x_draw_bar_cursor (w, row, width, kind)
        }
       else
        {
+         hbar_width = min (FRAME_COLUMN_WIDTH (f), cursor_glyph->pixel_width);
+
+         /* Multibyte character can be wider than FRAME_COLUMN_WIDTH. */
+         if (cursor_glyph->type == CHAR_GLYPH && cursor_glyph->u.ch >= 0x80)
+           hbar_width = cursor_glyph->pixel_width;
+
          w32_fill_area (f, hdc, cursor_color, x,
                         WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
                                                  row->height - width),
-                        min (FRAME_COLUMN_WIDTH (f), cursor_glyph->pixel_width),
+                        hbar_width,
                         width);
        }







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#3005: marked as done (23.0.92; w32term.c: width of hbar  cursor on a wide character)
  2009-04-16  0:02 ` bug#3005: 23.0.92; w32term.c: width of hbar cursor on a wide character Yu-ji Hosokawa
  2009-04-16 15:20   ` Drew Adams
@ 2009-04-19 15:20   ` Emacs bug Tracking System
  1 sibling, 0 replies; 4+ messages in thread
From: Emacs bug Tracking System @ 2009-04-19 15:20 UTC (permalink / raw)
  To: Jason Rumney

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]


Your message dated Sun, 19 Apr 2009 23:11:52 +0800
with message-id <49EB3F38.20001@gnu.org>
and subject line Re: bug#3005: 23.0.92;	w32term.c: width of hbar cursor on a wide character
has caused the Emacs bug report #3005,
regarding 23.0.92; w32term.c: width of hbar cursor on a wide character
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3005: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3005
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 28101 bytes --]

[-- Attachment #2.1.1: Type: Text/Plain, Size: 2230 bytes --]

Hello,

The width of HBAR cursor on a wide character is narrower than the
character width.
On Emacs 22.3, HBAR cursor width and the underlying character width
were the same. It is a desirable view, I think.

I'm so sorry I'm poor in English. I worry about whether you
understand my English.
Please see attached image, "23_0_92.png" and "22_3.png".

If it is not intentional change, what about the patch below?

thanks,
--yu


$ cvs diff -pu src/w32term.c
Index: src/w32term.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32term.c,v
retrieving revision 1.323
diff -p -u -r1.323 w32term.c
--- src/w32term.c       22 Mar 2009 02:39:30 -0000      1.323
+++ src/w32term.c       15 Apr 2009 22:10:02 -0000
@@ -5025,7 +5025,7 @@ x_draw_bar_cursor (w, row, width, kind)
          w32_fill_area (f, hdc, cursor_color, x,
                         WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
                                                  row->height - width),
-                        min (FRAME_COLUMN_WIDTH (f), cursor_glyph->pixel_width),
+                        cursor_glyph->pixel_width,
                         width);
        }



In GNU Emacs 23.0.92.1 (i386-mingw-nt5.1.2600)
 of 2009-04-16 on ASPIRIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -I/cygdrive/c/Users/yu-ji/src/GnuWin32/DLL'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: C
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: JPN
  value of $XMODIFIERS: nil
  locale-coding-system: cp932
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p - e - b <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

[-- Attachment #2.1.2: 23_0_92.png --]
[-- Type: Image/Png, Size: 8374 bytes --]

[-- Attachment #2.1.3: 22_3.png --]
[-- Type: Image/Png, Size: 8346 bytes --]

[-- Attachment #2.1.4: sample_text.txt --]
[-- Type: Text/Plain, Size: 261 bytes --]

(emacs-version)
=> "GNU Emacs 23.0.92.1 (i386-mingw-nt5.1.2600)
 of 2009-04-15 on ASPIRIN"

(setq cursor-type '(hbar . 5))
=> (hbar . 5)

あいうえお あいうえお Japanese Hirakana
TAB	TAB
" " japanese-jisx0208 Japanese IDEOGRAPHIC SPACE #x3000

[-- Attachment #3: Type: message/rfc822, Size: 3468 bytes --]

From: Jason Rumney <jasonr@gnu.org>
To: Yu-ji Hosokawa <yu-ji@hoso.net>, 3005-done@emacsbugs.donarmstrong.com
Cc: drew.adams@oracle.com
Subject: Re: bug#3005: 23.0.92;	w32term.c: width of hbar cursor on a wide character
Date: Sun, 19 Apr 2009 23:11:52 +0800
Message-ID: <49EB3F38.20001@gnu.org>

Yu-ji Hosokawa wrote:
>>> The width of HBAR cursor on a wide character is narrower than the
>>> character width.
>>> On Emacs 22.3, HBAR cursor width and the underlying character width
>>> were the same. It is a desirable view, I think.
>>>       
>> See bug #1258.
>>     
>
> Thank you for the info.
> Again patch. How about the following?
> It works fine for me. but I noticed that even if it patched, still
> not relieve composed form character width.
>   

I've installed a fix that uses the same method to compute the width of 
an hbar cursor as is used for block cursors.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-19 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <49EB3F38.20001@gnu.org>
2009-04-16  0:02 ` bug#3005: 23.0.92; w32term.c: width of hbar cursor on a wide character Yu-ji Hosokawa
2009-04-16 15:20   ` Drew Adams
2009-04-16 22:02     ` Yu-ji Hosokawa
2009-04-19 15:20   ` bug#3005: marked as done (23.0.92; w32term.c: width of hbar cursor on a wide character) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).