all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Robert Pluim <rpluim@gmail.com>, 37770@debbugs.gnu.org
Subject: bug#37770: [PATCH] Expose scale factor through the redisplay interface
Date: Tue, 22 Oct 2019 15:06:49 -0300	[thread overview]
Message-ID: <CAELgYhe_1gz_=KMEYhJBKzUZW_cQS1rNHF=NZ_5HS117se=5Ew@mail.gmail.com> (raw)
In-Reply-To: <CAELgYhf_j-DzfBXznA7VSWC6T=V58UVvyB3WMV=2TLZiM=adOA@mail.gmail.com>

I've improved the code comment for the redisplay interface entry in:

https://github.com/memeplex/emacs/commit/d3c66e6eea8a3b6f1a269bd968597a3bd8a3e811

(to generate the patch, add a .patch suffix to that url)

The new comment states:

/* Return the scale factor for the screen containing frame F. All
geometries are reported by the backend using a scale that is
approximately 96dpi x scale_factor. This scale may match
physical resolution or not. */

Some thoughts:

One possibility for the (maybe distant) future, is that this scale
factor api won't be needed any more. Like nsterm does (I believe), all
backends might expose a 1 x 96dpi interface so that the upper layers
can work mostly or fully unaware of the device complexities. But at
this moment the xterm backend goes to lengths in order to revert gtk
auto-scaling and provide a "physical dpi" (well, not necessarily
physical, since there is still randr in the middle)  interface to the
upper layers, thus losing the benefits of gtk auto-scaling, although
with good reason since nowadays gtk is more of a hack to the x11
backend, sniffing the underlying x event loop as it is, than a proper
backend on its own.

Anyway, even if that's not the trend, exposing a higher scale factor
to the upper layers still has the potential benefit of letting those
layers decide how to better use the extra available resolution,
instead of pretending they are drawing to a vintage screen. Whether
this is worthwhile or not I don't know, given that font and image
rendering are the parts most profited from this extra resolution, and
that fact every modern toolkit already exploits. In any case, at this
moment we still need the api because of the differences between
backends.





  reply	other threads:[~2019-10-22 18:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 22:29 bug#37770: [PATCH] Expose scale factor through the redisplay interface Carlos Pita
2019-10-16  0:32 ` Carlos Pita
2019-10-16  8:51   ` Robert Pluim
2019-10-16 16:12     ` Carlos Pita
2019-10-16 19:08       ` Carlos Pita
2019-10-17  8:01         ` Robert Pluim
2019-10-20 12:34         ` Eli Zaretskii
2019-10-20 17:22           ` Carlos Pita
2019-10-22 18:06             ` Carlos Pita [this message]
2019-10-24  9:19               ` Robert Pluim
2019-10-24 14:34                 ` Carlos Pita

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

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

  git send-email \
    --in-reply-to='CAELgYhe_1gz_=KMEYhJBKzUZW_cQS1rNHF=NZ_5HS117se=5Ew@mail.gmail.com' \
    --to=carlosjosepita@gmail.com \
    --cc=37770@debbugs.gnu.org \
    --cc=eliz@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.