unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Carlos Pita <carlosjosepita@gmail.com>
Cc: rpluim@gmail.com, 37770@debbugs.gnu.org
Subject: bug#37770: [PATCH] Expose scale factor through the redisplay interface
Date: Sun, 20 Oct 2019 15:34:31 +0300	[thread overview]
Message-ID: <838spf61ew.fsf@gnu.org> (raw)
In-Reply-To: <CAELgYheuShNh_YYg_uy6iw67B5UnCka+zP5T8RA0VZLqnWBe4Q@mail.gmail.com> (message from Carlos Pita on Wed, 16 Oct 2019 16:08:47 -0300)

> From: Carlos Pita <carlosjosepita@gmail.com>
> Date: Wed, 16 Oct 2019 16:08:47 -0300
> Cc: 37770@debbugs.gnu.org
> 
> Eli told me that you prefer code comments to long commit messages but
> in this case I think the rationale would be lost in fragmentary
> comments here and there. It's true that there is still the reference
> to this discussion in the commit message, but I believe it's
> convenient to quickly get a description of the change using git blame
> when browsing the code. If you disagree I will remove the notes from
> the commit message and copy them here.

The explanations should precede the file/function entries part.

> Note 1: both x_get_scale_factor and w32_get_scale_factor computed
> distinct scales for x and y by taking the ratio between effective
> resolution in each direction and a standard 96 dpi resolution.  Since
> this ratio is then truncated to an integer (the floor) it seems to me
> that there is no sensible possibility that these two numbers
> diverge. Moreover, modern toolkits report one number as scale factor
> and we need a common interface here. For those reasons I'm arbitrarily
> picking the horizontal scale factor as THE scale factor.

I'm not sure about this.  Admittedly, I'm not an expert on screen
scales on GUI systems, but why do we need to drop the two scale
factors as part of this change, which is basically just refactoring?
I'd suggest to keep the 2 scale factors for now.  We can always
replace 2 with one later.

> +static double
> +ns_get_scale_factor (struct frame *f)
> +{
> +  return 1;  // TODO do we need to do something else here?

Please use C-style comments, /* Like this.  */, not C++ style.

Thanks.





  parent reply	other threads:[~2019-10-20 12:34 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 [this message]
2019-10-20 17:22           ` Carlos Pita
2019-10-22 18:06             ` Carlos Pita
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

  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=838spf61ew.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37770@debbugs.gnu.org \
    --cc=carlosjosepita@gmail.com \
    --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).