From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37689: Fringe pixmaps, widgets, etc. look ridiculously tiny in hidpi screen Date: Mon, 14 Oct 2019 11:33:02 +0300 Message-ID: <835zkrk9q9.fsf@gnu.org> References: <83sgo1rpbx.fsf@gnu.org> <831rvksksa.fsf@gnu.org> <83v9swqz9q.fsf@gnu.org> <83k19ao21y.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="128995"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rpluim@gmail.com, 37689@debbugs.gnu.org To: Carlos Pita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 14 10:34:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJvo4-000XPV-7F for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Oct 2019 10:34:20 +0200 Original-Received: from localhost ([::1]:45706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJvo3-0007BL-65 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Oct 2019 04:34:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54554) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJvnn-0007AH-FQ for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 04:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJvnm-0008ON-B7 for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 04:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57507) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJvnm-0008O8-7q for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 04:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iJvnm-0006Sw-1V for bug-gnu-emacs@gnu.org; Mon, 14 Oct 2019 04:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Oct 2019 08:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37689 X-GNU-PR-Package: emacs Original-Received: via spool by 37689-submit@debbugs.gnu.org id=B37689.157104199724796 (code B ref 37689); Mon, 14 Oct 2019 08:34:01 +0000 Original-Received: (at 37689) by debbugs.gnu.org; 14 Oct 2019 08:33:17 +0000 Original-Received: from localhost ([127.0.0.1]:38095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJvn3-0006Rs-1X for submit@debbugs.gnu.org; Mon, 14 Oct 2019 04:33:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJvn0-0006Rc-1j for 37689@debbugs.gnu.org; Mon, 14 Oct 2019 04:33:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJvmu-0007T1-Tw; Mon, 14 Oct 2019 04:33:08 -0400 Original-Received: from [176.228.60.248] (port=3686 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJvmu-0005VF-3r; Mon, 14 Oct 2019 04:33:08 -0400 In-reply-to: (message from Carlos Pita on Sun, 13 Oct 2019 21:40:14 -0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169244 Archived-At: > From: Carlos Pita > Date: Sun, 13 Oct 2019 21:40:14 -0300 > Cc: Robert Pluim , 37689@debbugs.gnu.org > > 1.a. Do the scaling as downstream as possible. The problem with this > approach is that I will be fixing the problem only for one backend > (for example, Cairo). Also, I would have to "hack" some assumptions > done upstream (for example, to adjust x, y and scale of a rectangle > that is assumed to be of a different geometry by the caller). The > advantage of the approach is that not only fringe icons but any other > image that is rendered by the lowest level routine will be properly > scaled; but, that said, I noticed that in emacs 26.3 widgets are not > using x_cr_draw_image. > > 1.b. Do the scaling upstream (for example, in get_fringe_bitmap_data > as proposed above). One problem with this approach is that some > backend could already be scaling output itself (for example, by using > a toolkit that automatically scales according to the device > resolution... do you know if this is the case for windows, for > macos?). Also, it won't fix the widgets issue (anyway, as I said, > neither the "downstream" approach will do it in 26.3). Granted, I prefer the second approach. We should do as little code duplication as possible. I don't think individual backends do any scaling, but if some do, it should be easy to disable the scaling in our code for those backends. > 2. I'm clueless regarding were widgets (I mean checkboxes and things > like that) are rendered. With Cairo backend enabled, x_cr_draw_image > is never reached in 26.3, its only user is the fringe module, I've > checked this in the debugger and by inspecting the code. Not sure > about 27, since tweaking x_cr_draw_image did have a (weird) effect, as > the screenshots in my previous post show. I'm not sure I understand how this is related to the issue at hand. Can you elaborate? Also, what exactly do you mean by "rendered"? In Emacs, there are generally 2 stages of displaying any "display element" (a character, an image, etc.): first, a backend-independent step of loading the display element, determining its metrics, and performing the display layout calculations derived from that; and then backend-dependent step of actually delivering the display element to the glass. Which one of those did you have in mind? Thanks.