unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35814: 27.0.50; Broken font display
@ 2019-05-20 21:33 Juri Linkov
  2019-05-21  6:01 ` Alex Gramiak
  0 siblings, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2019-05-20 21:33 UTC (permalink / raw)
  To: 35814

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

Some yesterday's commit in master broke the display of the text that uses
the font "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso10646-*"
in GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Linux Mint 19

Screenshot:


[-- Attachment #2: 20190520.png --]
[-- Type: image/png, Size: 3484 bytes --]

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

* bug#35814: 27.0.50; Broken font display
  2019-05-20 21:33 bug#35814: 27.0.50; Broken font display Juri Linkov
@ 2019-05-21  6:01 ` Alex Gramiak
  2019-05-21  8:03   ` Katsumi Yamaoka
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alex Gramiak @ 2019-05-21  6:01 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 35814

Juri Linkov <juri@linkov.net> writes:

> Some yesterday's commit in master broke the display of the text that uses
> the font "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso10646-*"
> in GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
> System Description: Linux Mint 19
>
> Screenshot:

It's probably due to my a4fe9c70af7 commit, sorry.

I tested with all X font backends -- what's the value of
(frame-parameter nil 'font-backend) normally?

And is it only that font, or other fonts as well?





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

* bug#35814: 27.0.50; Broken font display
  2019-05-21  6:01 ` Alex Gramiak
@ 2019-05-21  8:03   ` Katsumi Yamaoka
  2019-05-21 19:14   ` Andy Moreton
  2019-05-21 19:41   ` Juri Linkov
  2 siblings, 0 replies; 7+ messages in thread
From: Katsumi Yamaoka @ 2019-05-21  8:03 UTC (permalink / raw)
  To: Alex Gramiak; +Cc: 35814, Juri Linkov

On Tue, 21 May 2019 00:01:39 -0600, Alex Gramiak wrote:
> It's probably due to my a4fe9c70af7 commit, sorry.

> I tested with all X font backends -- what's the value of
> (frame-parameter nil 'font-backend) normally?

> And is it only that font, or other fonts as well?

It happens to me too with the japanese-jisx0208 font:

"-misc-fixed-medium-r-normal-*-16-*-*-*-*-*-jisx0208.1983-0"

After starting emacs -Q the `C-h h' display is all ok, however
setting that font breaks the display for the cjk text.

(frame-parameter nil 'font-backend)
 => (xft x)

In GNU Emacs 27.0.50 (build 1, x86_64-pc-cygwin, GTK+ Version 3.22.28)
 of 2019-05-21 built on localhost

Regards,





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

* bug#35814: 27.0.50; Broken font display
  2019-05-21  6:01 ` Alex Gramiak
  2019-05-21  8:03   ` Katsumi Yamaoka
@ 2019-05-21 19:14   ` Andy Moreton
  2019-05-21 21:19     ` Alex Gramiak
  2019-05-21 19:41   ` Juri Linkov
  2 siblings, 1 reply; 7+ messages in thread
From: Andy Moreton @ 2019-05-21 19:14 UTC (permalink / raw)
  To: 35814

On Tue 21 May 2019, Alex Gramiak wrote:

> Juri Linkov <juri@linkov.net> writes:
>
>> Some yesterday's commit in master broke the display of the text that uses
>> the font "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso10646-*"
>> in GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
>> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
>> System Description: Linux Mint 19
>>
>> Screenshot:
>
> It's probably due to my a4fe9c70af7 commit, sorry.
>
> I tested with all X font backends -- what's the value of
> (frame-parameter nil 'font-backend) normally?
>
> And is it only that font, or other fonts as well?

Alex, at the end of xfont_draw() in xfont.c, we now have:

      else
        {
          const unsigned code = s->char2b[from];
          const XChar2b char2b = { .byte1 = code >> 8,
                                   .byte2 = code & 0xFF };
          XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f),
                              gc, x, y, &char2b, len);
        }

and:
      else
        {
          const unsigned code = s->char2b[from];
          const XChar2b char2b = { .byte1 = code >> 8,
                                   .byte2 = code & 0xFF };
          XDrawString16 (display, FRAME_X_DRAWABLE (s->f),
                         gc, x, y, &char2b, len);
        }

Both of these pass "len", but use a single XChar2b on the stack, so
this causes an overrun (and draws random stack contents).

    AndyM






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

* bug#35814: 27.0.50; Broken font display
  2019-05-21  6:01 ` Alex Gramiak
  2019-05-21  8:03   ` Katsumi Yamaoka
  2019-05-21 19:14   ` Andy Moreton
@ 2019-05-21 19:41   ` Juri Linkov
  2 siblings, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2019-05-21 19:41 UTC (permalink / raw)
  To: Alex Gramiak; +Cc: 35814

>> Some yesterday's commit in master broke the display of the text that uses
>> the font "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso10646-*"
>> in GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
>> Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
>> System Description: Linux Mint 19
>>
>> Screenshot:
>
> It's probably due to my a4fe9c70af7 commit, sorry.

Yes, after reverting a4fe9c70af7 locally,
everything is fine as before.

> I tested with all X font backends -- what's the value of
> (frame-parameter nil 'font-backend) normally?

(frame-parameter nil 'font-backend)
=> (xft x)

> And is it only that font, or other fonts as well?

I don't know about other fonts.  At least, I see that
the default font was fine.  And as you can see on the
previous screenshot of the etc/TODO file, parts of the
buffer that display text with the italic face, are
not affected by this problem.





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

* bug#35814: 27.0.50; Broken font display
  2019-05-21 19:14   ` Andy Moreton
@ 2019-05-21 21:19     ` Alex Gramiak
  2019-05-21 21:42       ` Juri Linkov
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Gramiak @ 2019-05-21 21:19 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Katsumi Yamaoka, 35814, Juri Linkov

Andy Moreton <andrewjmoreton@gmail.com> writes:

> Alex, at the end of xfont_draw() in xfont.c, we now have:
>
>       else
>         {
>           const unsigned code = s->char2b[from];
>           const XChar2b char2b = { .byte1 = code >> 8,
>                                    .byte2 = code & 0xFF };
>           XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f),
>                               gc, x, y, &char2b, len);
>         }
>
> and:
>       else
>         {
>           const unsigned code = s->char2b[from];
>           const XChar2b char2b = { .byte1 = code >> 8,
>                                    .byte2 = code & 0xFF };
>           XDrawString16 (display, FRAME_X_DRAWABLE (s->f),
>                          gc, x, y, &char2b, len);
>         }
>
> Both of these pass "len", but use a single XChar2b on the stack, so
> this causes an overrun (and draws random stack contents).

Wow, sorry, that was a bad mistake. I've applied commit 5a024b72c to
master; can those who experience the bug affirm that it's been fixed?

It appears that I only tested with fonts that make s->padding_p true,
and I can't seem to find a font on my system that doesn't.





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

* bug#35814: 27.0.50; Broken font display
  2019-05-21 21:19     ` Alex Gramiak
@ 2019-05-21 21:42       ` Juri Linkov
  0 siblings, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2019-05-21 21:42 UTC (permalink / raw)
  To: Alex Gramiak; +Cc: Andy Moreton, Katsumi Yamaoka, 35814-done

> Wow, sorry, that was a bad mistake. I've applied commit 5a024b72c to
> master; can those who experience the bug affirm that it's been fixed?
>
> It appears that I only tested with fonts that make s->padding_p true,
> and I can't seem to find a font on my system that doesn't.

Thanks!  Now everything is back to normal.  Closing.





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

end of thread, other threads:[~2019-05-21 21:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-20 21:33 bug#35814: 27.0.50; Broken font display Juri Linkov
2019-05-21  6:01 ` Alex Gramiak
2019-05-21  8:03   ` Katsumi Yamaoka
2019-05-21 19:14   ` Andy Moreton
2019-05-21 21:19     ` Alex Gramiak
2019-05-21 21:42       ` Juri Linkov
2019-05-21 19:41   ` Juri Linkov

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).