unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* pgtk does not do subpixel rendering
@ 2022-05-12 16:48 Torsten Bronger
  2022-05-13  0:30 ` Po Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bronger @ 2022-05-12 16:48 UTC (permalink / raw)
  To: help-gnu-emacs

Hallöchen!

Everything observed with Ubuntu 33.04’s Wayland configuration:

Compiling Emacs with --with-pgtk switches off subpixel rendering,
making everything slightly more blurry.  Playing with other options
(e.g. --with-cairo) did not bring it back.  Only --with-x instead of
--with-pgtk restores subpixel rendering.  Is this a bug, a known
limitation, or a configuration error on my side?  The complete
configure command is:

./configure --prefix=/usr/ --mandir=/usr/share/man/ --infodir=/usr/share/info/ \
            --with-x --with-x-toolkit=no --with-xpm --with-jpeg --with-tiff --with-gif --with-png \
            --with-file-notification=inotify

with X and

./configure --prefix=/usr/ --mandir=/usr/share/man/ --infodir=/usr/share/info/ \
            --with-pgtk --with-xpm --with-jpeg --with-tiff --with-gif --with-png \
            --with-file-notification=inotify

with pgtk.

Regards,
Torsten.

-- 
Torsten Bronger




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

* Re: pgtk does not do subpixel rendering
  2022-05-12 16:48 pgtk does not do subpixel rendering Torsten Bronger
@ 2022-05-13  0:30 ` Po Lu
  2022-05-13  7:46   ` Torsten Bronger
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu @ 2022-05-13  0:30 UTC (permalink / raw)
  To: help-gnu-emacs

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> Hallöchen!
>
> Everything observed with Ubuntu 33.04’s Wayland configuration:
>
> Compiling Emacs with --with-pgtk switches off subpixel rendering,
> making everything slightly more blurry.  Playing with other options
> (e.g. --with-cairo) did not bring it back.  Only --with-x instead of
> --with-pgtk restores subpixel rendering.  Is this a bug, a known
> limitation, or a configuration error on my side?  The complete
> configure command is:
>
> ./configure --prefix=/usr/ --mandir=/usr/share/man/ --infodir=/usr/share/info/ \
>             --with-x --with-x-toolkit=no --with-xpm --with-jpeg --with-tiff --with-gif --with-png \
>             --with-file-notification=inotify
>
> with X and
>
> ./configure --prefix=/usr/ --mandir=/usr/share/man/ --infodir=/usr/share/info/ \
>             --with-pgtk --with-xpm --with-jpeg --with-tiff --with-gif --with-png \
>             --with-file-notification=inotify
>
> with pgtk.
>
> Regards,
> Torsten.

When did you compile that Emacs?  The bug was fixed last month.



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

* Re: pgtk does not do subpixel rendering
  2022-05-13  0:30 ` Po Lu
@ 2022-05-13  7:46   ` Torsten Bronger
  2022-05-13  8:18     ` Po Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bronger @ 2022-05-13  7:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hallöchen!

Po Lu writes:

> Torsten Bronger <bronger@physik.rwth-aachen.de> writes:
>
>> Everything observed with Ubuntu 22.04’s Wayland configuration:
>>
>> Compiling Emacs with --with-pgtk switches off subpixel rendering,
>> [...]
>
> When did you compile that Emacs?  The bug was fixed last month.

I indeed used a too old Emacs (the Git HEAD of 14th March).
However, the current HEAD exhibits the same behaviour for me: No
subpixel rendering under Wayland on a low-res display if I compile
with --with-pgtk, and subpixel rendering without --with-pgtk.

Here is my configure output with --with-pgtk:


Configured for 'x86_64-pc-linux-gnu'.

  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -g3 -O2
  Should Emacs use the GNU version of malloc?             no
    (The GNU allocators don't work with this system configuration.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    pgtk
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   no
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng16 -lz
  Does Emacs use -lrsvg-2?                                yes
  Does Emacs use -lwebp?                                  yes
  Does Emacs use -lsqlite3?                               yes
  Does Emacs use cairo?                                   yes
  Does Emacs use -llcms2?                                 yes
  Does Emacs use imagemagick?                             no
  Does Emacs use native APIs for images?                  no
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   yes
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lglibc (inotify)
  Does Emacs use access control lists?                    yes -lacl
  Does Emacs use -lselinux?                               yes
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use HarfBuzz?                                yes
  Does Emacs use -lm17n-flt?
  Does Emacs use -lotf?                                   yes
  Does Emacs use -lxft?
  Does Emacs use -lsystemd?                               yes
  Does Emacs use -ljansson?                               yes
  Does Emacs use the GMP library?                         yes
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                yes
  Does Emacs use toolkit scroll bars?                     yes
  Does Emacs support Xwidgets?                            no
  Does Emacs have threading support in lisp?              yes
  Does Emacs support the portable dumper?                 yes
  Does Emacs support legacy unexec dumping?               no
  Which dumping strategy does Emacs use?                  pdumper
  Does Emacs have native lisp compiler?                   no
  Does Emacs use version 2 of the the X Input Extension?  no


Regards,
Torsten.

-- 
Torsten Bronger




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

* Re: pgtk does not do subpixel rendering
  2022-05-13  7:46   ` Torsten Bronger
@ 2022-05-13  8:18     ` Po Lu
  2022-05-13 10:25       ` Torsten Bronger
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu @ 2022-05-13  8:18 UTC (permalink / raw)
  To: help-gnu-emacs

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> I indeed used a too old Emacs (the Git HEAD of 14th March).
> However, the current HEAD exhibits the same behaviour for me: No
> subpixel rendering under Wayland on a low-res display if I compile
> with --with-pgtk, and subpixel rendering without --with-pgtk.

What happens if you run Emacs under Xwayland?  And are you sure that
what you see is really because subpixel anti-aliasing is not being
performed, and not because your hinting preferences are not being
respected?

The latter is a bug that hasn't been fixed yet.  A patch exists but
we're waiting for papers.

Thanks.



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

* Re: pgtk does not do subpixel rendering
  2022-05-13  8:18     ` Po Lu
@ 2022-05-13 10:25       ` Torsten Bronger
  2022-05-13 11:13         ` Po Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bronger @ 2022-05-13 10:25 UTC (permalink / raw)
  To: help-gnu-emacs

Hallöchen!

Po Lu writes:

> Torsten Bronger <bronger@physik.rwth-aachen.de> writes:
>
>> I indeed used a too old Emacs (the Git HEAD of 14th March).
>> However, the current HEAD exhibits the same behaviour for me: No
>> subpixel rendering under Wayland on a low-res display if I compile
>> with --with-pgtk, and subpixel rendering without --with-pgtk.
>
> What happens if you run Emacs under Xwayland?

Frankly, I don’t know how to check whether Emacs uses Xwayland.  If
I compile with --with-x I would expect it to do always, but is this
the case?

> And are you sure that what you see is really because subpixel
> anti-aliasing is not being performed, and not because your hinting
> preferences are not being respected?

What I do is pretty crude: I make a screenshot and look at it in
Gimp heavily magnified.  With pgtk, I see only greyscale at the rim
of the glyphs, and without pgtk, I see pixels of various colours
(greenish/reddish).  This coincides with my subjective observation
that in the latter case, the text is crisper.

I do see subpixels in the menu text of other applications as well as
in the Chromium browser, in the same Gnome session as Emacs.

Regards,
Torsten.

-- 
Torsten Bronger




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

* Re: pgtk does not do subpixel rendering
  2022-05-13 10:25       ` Torsten Bronger
@ 2022-05-13 11:13         ` Po Lu
  2022-05-13 12:06           ` Torsten Bronger
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu @ 2022-05-13 11:13 UTC (permalink / raw)
  To: help-gnu-emacs

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> Frankly, I don’t know how to check whether Emacs uses Xwayland.  If
> I compile with --with-x I would expect it to do always, but is this
> the case?

What I asked was to run a PGTK build with the environment variable
"GDK_BACKEND" set to "x".



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

* Re: pgtk does not do subpixel rendering
  2022-05-13 11:13         ` Po Lu
@ 2022-05-13 12:06           ` Torsten Bronger
  2022-05-15  8:08             ` Po Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bronger @ 2022-05-13 12:06 UTC (permalink / raw)
  To: help-gnu-emacs

Hallöchen!

Po Lu writes:

> Torsten Bronger <bronger@physik.rwth-aachen.de> writes:
>
>> Frankly, I don’t know how to check whether Emacs uses Xwayland.  If
>> I compile with --with-x I would expect it to do always, but is this
>> the case?
>
> What I asked was to run a PGTK build with the environment variable
> "GDK_BACKEND" set to "x".

$ GDK_BACKEND=x emacs

(emacs:310353): Gtk-WARNING **: 14:03:19.946: cannot open display: :0


$ ps -ef | grep Xway
bronger    14301   14047  0 07:49 ?        00:02:19 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1000/.mutter-Xwaylandauth.KWK1L1 -listen 4 -listen 5 -displayfd 6 -initfd 7


Regards,
Torsten.

-- 
Torsten Bronger




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

* Re: pgtk does not do subpixel rendering
  2022-05-13 12:06           ` Torsten Bronger
@ 2022-05-15  8:08             ` Po Lu
  2022-05-15 15:27               ` Torsten Bronger
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu @ 2022-05-15  8:08 UTC (permalink / raw)
  To: help-gnu-emacs

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> Hallöchen!
>
> Po Lu writes:
>
>> Torsten Bronger <bronger@physik.rwth-aachen.de> writes:
>>
>>> Frankly, I don’t know how to check whether Emacs uses Xwayland.  If
>>> I compile with --with-x I would expect it to do always, but is this
>>> the case?
>>
>> What I asked was to run a PGTK build with the environment variable
>> "GDK_BACKEND" set to "x".
>
> $ GDK_BACKEND=x emacs
>
> (emacs:310353): Gtk-WARNING **: 14:03:19.946: cannot open display: :0

Hmmm... odd, but could you try again with the latest code?  I think some
recent changes should solve your problem.



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

* Re: pgtk does not do subpixel rendering
  2022-05-15  8:08             ` Po Lu
@ 2022-05-15 15:27               ` Torsten Bronger
  2022-05-16  1:04                 ` Po Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Torsten Bronger @ 2022-05-15 15:27 UTC (permalink / raw)
  To: help-gnu-emacs

Hallöchen!

Po Lu writes:

> [...]
>
> Hmmm... odd, but could you try again with the latest code?  I
> think some recent changes should solve your problem.

You are right, with the current Git HEAD is see subpixel rendering
with --with-pgkt.  Thank you!

Regards,
Torsten.

-- 
Torsten Bronger




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

* Re: pgtk does not do subpixel rendering
  2022-05-15 15:27               ` Torsten Bronger
@ 2022-05-16  1:04                 ` Po Lu
  0 siblings, 0 replies; 10+ messages in thread
From: Po Lu @ 2022-05-16  1:04 UTC (permalink / raw)
  To: help-gnu-emacs

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> You are right, with the current Git HEAD is see subpixel rendering
> with --with-pgkt.  Thank you!

Glad I could be of assistance.



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

end of thread, other threads:[~2022-05-16  1:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-12 16:48 pgtk does not do subpixel rendering Torsten Bronger
2022-05-13  0:30 ` Po Lu
2022-05-13  7:46   ` Torsten Bronger
2022-05-13  8:18     ` Po Lu
2022-05-13 10:25       ` Torsten Bronger
2022-05-13 11:13         ` Po Lu
2022-05-13 12:06           ` Torsten Bronger
2022-05-15  8:08             ` Po Lu
2022-05-15 15:27               ` Torsten Bronger
2022-05-16  1:04                 ` Po Lu

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