GNU bug report logs - #37752
Scaling factor inconsistencies between X with and without GTK

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Tue, 15 Oct 2019 00:23:01 UTC

Severity: normal

Done: Carlos Pita <carlosjosepita <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Carlos Pita <carlosjosepita <at> gmail.com>
Subject: bug#37752: closed (Re: bug#37752: Scaling factor inconsistencies
 between X with and without GTK)
Date: Tue, 15 Oct 2019 22:41:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#37752: Scaling factor inconsistencies between X with and without GTK

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 37752 <at> debbugs.gnu.org.

-- 
37752: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37752
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 37752-close <at> debbugs.gnu.org
Subject: Re: bug#37752: Scaling factor inconsistencies between X with and
 without GTK
Date: Tue, 15 Oct 2019 19:40:02 -0300
Hi Robert, I'm closing this in favor of

#37770 [PATCH] Expose scale factor through the redisplay interface

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37770

Please take a look at it if you're so kind.

Best regards
--
Carlos

[Message part 3 (message/rfc822, inline)]
From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Scaling factor inconsistencies between X with and without GTK
Date: Mon, 14 Oct 2019 21:21:54 -0300
In many places in xterm.c you have code like:

#ifdef USE_GTK
  scale = xg_get_scale (f);
#endif

Sometimes scale is only used in GTK specific code and that's ok.

But sometimes it's used in code that's not particular to GTK, for example:

int scale = 1;
#ifdef USE_GTK
  scale = xg_get_scale (f);
#endif
FRAME_CR_SURFACE (f) =
    cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
      scale * FRAME_PIXEL_WIDTH (f),
      scale * FRAME_PIXEL_HEIGHT (f));

Besides, there is x_get_scale_factor, also defined in xterm.c, which
computes the scaling factor in a GTK-independent way, and also
discriminates between x and y scaling factors. It's only used by
x_draw_underwave.

I would like to abstract both cases inside x_get_scale_factor, that
would then use xg_get_scale if in GTK or compute just one scaling
factor (for x or for y) otherwise. Notice that given that the scaling
factor is the ratio of the effective resolution to a base resolution
of 96 dpi *truncated down* to the nearest integer, AFAICS it's almost
impossible to get different scaling factors for x and for y.

What do you think?

Best regards
--
Carlos



This bug report was last modified 5 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.