unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: Alan Third <alan@idiocy.org>
Cc: Robert Pluim <rpluim@gmail.com>, 37689@debbugs.gnu.org
Subject: bug#37689: Fringe pixmaps, widgets, etc. look ridiculously tiny in hidpi screen
Date: Mon, 14 Oct 2019 11:37:03 -0300	[thread overview]
Message-ID: <CAELgYhfr-UpytLfiZR0hLJ-eLCaTybs3kVBJGgtdsQxDb8mZmA@mail.gmail.com> (raw)
In-Reply-To: <20191014131955.GC45622@breton.holly.idiocy.org>

> Granted, I prefer the second approach.  We should do as little code duplication as possible.

But we might be duplicating what backends already do.

> I don't think individual backends do any scaling

My understanding is that nowadays everything is up-scaled by the
toolkit, except for fonts that use more sophisticated algorithms to
fit the larger grid of available pixels. So an application using a
modern toolkit should be mostly unaware of screen resolution. In fact,
I've reported some hidpi bugs here and there and, in general, they
were in places where the application did make some explicit geometry
computation based on actual resolution. Or see how "supporting hidpi"
translates in many cases to "port from gtk2 to gtk3". Or look at my
screenshots above, do they look too big? Well, that's because they're
taken from a hidpi screen; now, you might be in a lowdpi one and then
it's obvious that they will look twice as big there; but even if
you're in a hidpi screen I bet you probably will see them doubling the
real thing, because many apps are unaware or ignore the original image
resolution and just let the toolkit show it at 2x. There are plenty of
questions (for both Linux and MacOS) around the web asking "why my
screenshots look too big?", as a cursory google search will show,
although I think the problem was eventually addressed in MacOS,
perhaps in core apps or perhaps in general. That might be the reason
why Alan says that "The only exception is images".

> I think it should be easy to make it do the right thing here.

If you had one single backend this would clearly simplify matters. But
when you had to support three ones, it isn't that clear. Nevertheless,
I think any approach that relies on emacs doing the scaling must be
*carefully* evaluated, because it would mean solving a hard problem
that even toolkits have a hard time to address. Consider for example
having different frames in different monitors each one with its own
dpi and geometry. Are you sure that all geometry/layout computations
for a frame are done by emacs on-the-fly so as they adapt when the
frame is moved from a monitor to another one? Is emacs doing all
geometry calculations itself from the actual device geometry and
resolution or is it most of a hodgepodge, with some things taken care
by the backend and other ones by emacs itself? How clear-cut is the
separation between the stages you mentioned (geometry calculation by
emacs and actual "delivery to the glass" by the backend)? Is it that
clear-cut for *all* supported backends?

Now, that said, I don't think it's a bad idea for emacs to deal with
these matters regardless of its backends (assuming it can force all
backends to work at 1x), since it provides its own toolkit (and its
own OS ;) ). What I would like to know is how close emacs is currently
to one and to the other approach.

> > 2. I'm clueless regarding were widgets (I mean checkboxes and things like that) are rendered.

> I'm not sure I understand how this is related to the issue at hand. Can you elaborate?

By widgets I was referring to the checkboxes, arrows and stuff that
you can see, for example, in a customize-face buffer. When changing
the scaling parameters in x_cr_render_image in emacs 26.3, fringe
bitmaps were affected but those aforementioned widgets weren't. In
emacs 27 they indeed were affected by the same changes in code, but
they looked weirdly distorted and clipped, as you can see in my
previous screenshot. So, in brief, I couldn't locate the C code path
for the rendering of this stuff, specially in emacs 26.3. And by
rendering I was indistinctly referring to both stages you describe.

Best regards
--
Carlos





  parent reply	other threads:[~2019-10-14 14:37 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  6:28 bug#37689: Fringe pixmaps, widgets, etc. look ridiculously tiny in hidpi screen Carlos Pita
2019-10-10  8:12 ` Eli Zaretskii
2019-10-10 13:26   ` Robert Pluim
2019-10-10 13:37     ` Carlos Pita
2019-10-10 13:47       ` Robert Pluim
2019-10-10 13:36   ` Carlos Pita
2019-10-10 14:21     ` Robert Pluim
2019-10-10 14:33       ` Carlos Pita
2019-10-10 14:37         ` Carlos Pita
2019-10-10 15:06         ` Eli Zaretskii
2019-10-10 15:43           ` Carlos Pita
2019-10-10 15:05       ` Eli Zaretskii
2019-10-10 15:51         ` Carlos Pita
2019-10-10 16:01           ` Carlos Pita
2019-10-10 17:35           ` Eli Zaretskii
2019-10-10 17:39             ` Carlos Pita
2019-10-11  3:26               ` Carlos Pita
2019-10-11  3:48                 ` Carlos Pita
2019-10-12  0:51                   ` Carlos Pita
2019-10-12  7:28                     ` Eli Zaretskii
2019-10-12  7:56                       ` Carlos Pita
2019-10-12  8:26                         ` Carlos Pita
2019-10-14  0:40                           ` Carlos Pita
2019-10-14  8:33                             ` Eli Zaretskii
2019-10-14 13:19                               ` Alan Third
2019-10-14 14:00                                 ` Eli Zaretskii
2019-10-17 11:48                                   ` Alan Third
2019-10-14 14:37                                 ` Carlos Pita [this message]
2019-10-14 14:54                                   ` Eli Zaretskii
2019-10-14 15:06                                     ` Carlos Pita
2019-10-14 15:15                                       ` Eli Zaretskii
2019-10-14 15:32                                         ` Carlos Pita
2019-10-14 16:52                                           ` Eli Zaretskii
2019-10-14 19:59                                             ` Carlos Pita
2019-10-14 23:42                                               ` Carlos Pita
2019-10-14 23:49                                                 ` Carlos Pita
2019-10-15  1:50                                                   ` Carlos Pita
2019-10-15  9:30                                                     ` Eli Zaretskii
2019-10-15 23:01                                                       ` Carlos Pita
2019-10-16  4:25                                                         ` Carlos Pita
2019-10-16  9:16                                                           ` martin rudalics
2019-10-16 16:31                                                             ` Carlos Pita
2019-10-16 16:40                                                               ` Carlos Pita
2019-10-16 19:01                                                                 ` Carlos Pita
2019-10-17  8:13                                                                   ` Robert Pluim
2019-10-15  9:27                                                 ` Eli Zaretskii
2019-10-20 16:03           ` Juri Linkov
2019-10-20 17:37             ` Carlos Pita
2019-10-20 18:52               ` Juri Linkov
2019-10-20 19:17                 ` Carlos Pita
2019-10-24 17:09                   ` Carlos Pita
2019-10-26 10:45                     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAELgYhfr-UpytLfiZR0hLJ-eLCaTybs3kVBJGgtdsQxDb8mZmA@mail.gmail.com \
    --to=carlosjosepita@gmail.com \
    --cc=37689@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=rpluim@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 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).