From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#37770: [PATCH] Expose scale factor through the redisplay interface Date: Tue, 15 Oct 2019 19:29:58 -0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000e1a1720594fa8608" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="182579"; mail-complaints-to="usenet@blaine.gmane.org" To: 37770@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 16 00:31:59 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 1iKVMD-000lLi-KM for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Oct 2019 00:31:57 +0200 Original-Received: from localhost ([::1]:60770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKVMC-0002Kr-Fx for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Oct 2019 18:31:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38272) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKVLM-0002I7-0h for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 18:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKVLK-0001Bi-6E for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 18:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKVLJ-0001Ba-TW for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 18:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iKVLJ-0005G0-Om for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 18:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Oct 2019 22:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37770 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157117861620142 (code B ref -1); Tue, 15 Oct 2019 22:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Oct 2019 22:30:16 +0000 Original-Received: from localhost ([127.0.0.1]:44965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKVKa-0005En-0i for submit@debbugs.gnu.org; Tue, 15 Oct 2019 18:30:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKVKY-0005Ed-5f for submit@debbugs.gnu.org; Tue, 15 Oct 2019 18:30:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38073) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKVKW-0001hy-Gb for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 18:30:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKVKU-0000h8-UN for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 18:30:12 -0400 Original-Received: from mail-yw1-xc42.google.com ([2607:f8b0:4864:20::c42]:35053) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKVKU-0000gi-OL for bug-gnu-emacs@gnu.org; Tue, 15 Oct 2019 18:30:10 -0400 Original-Received: by mail-yw1-xc42.google.com with SMTP id r134so7949423ywg.2 for ; Tue, 15 Oct 2019 15:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=uxsSpw5X7KpYb+0riIyRC2U2kq0e/sr8YvfSTrJ/KZM=; b=VCUGMk24XQEnN75OxL4A2dH0iRMvv8mC3WxciF3ZKlukKGfejaukjNM3LBH3p50OgN bIjc2Zx1Zxnrigdic/d9ch+tfPzNznMc8G/Af2xna0IZb1ddY0doMfVbX62u5uPLVVuA H2R29Wmmm+qVGnz7XTwqhbZvrHblkWGjWUXZz+IjGqttmotaHvjdu788Hc58K2u3qP69 tl9Ue0hqnSsqfbvRIaHntZtXPmb87ngz9vIH9wyYzWUNLCjrZfSZJ/Sgk/dTSvWm7Rvl DPk3nKzgxgpaWTV3GPbfOK8mD+QKYO3cXFkdvXP50kV3xcSiRfdrrkdz/Ux4iD7RW3iy kBOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=uxsSpw5X7KpYb+0riIyRC2U2kq0e/sr8YvfSTrJ/KZM=; b=kNG5vhKshmZkrMgcTxghvoYtFH1ZFUjeF9L56zPb7R7xgKLS4rxuRgvvGp1DQEMsdS Y9+tJ9xQffktE+MRLhCJar3cI8kf1RGKVyzkt54FXm6lCDCsnyYCz5LOpWQe+QUYl7ZO O3LpKhwbZ5d3VkATC11cbG5mEgsgZ/FSHu67y/mfbZDqbtGow/ZjfaS1pBzRH0ncWa7d VYndhDPrJAaYXbDjgNQpusJklPnAldfhCCR3x5oytr9BIe5AFb1dDTDYNAYQikji2ejj kxgFOkImqJyZ1i32D6TbZxMUpCx8C+ONTeo7v7b1LnXJgi6YyaWP3d6fDr5ZTx0IJVfi dBsg== X-Gm-Message-State: APjAAAWLFywBe8GenzJtUzF8yEyBTh8U3M9aswOQnMbYb7JHqoT6aVIU uoXyPMzgpt+nzKaura7nyCZRZDwmigM5uxOckQRqMMdhseY= X-Google-Smtp-Source: APXvYqxA8yNvPlOI6Pcg9xOPCVCmuZLbiME4sT2ZDZsR/as1XisgECuKzcvKZuTWbf6nkCpIPJIy9cFWIq8g/Sslv3Y= X-Received: by 2002:a81:b616:: with SMTP id u22mr18675528ywh.80.1571178609213; Tue, 15 Oct 2019 15:30:09 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:169398 Archived-At: --000000000000e1a1720594fa8608 Content-Type: text/plain; charset="UTF-8" I need this in order to move forward #37689. Besides I did some related changes proposed in #37752, which I'm no closing in favor of this one. Here is the commit message: * src/dispextern.h: add get_scale_factor API. * src/xterm.c: - Unify usages of xg_get_scale and x_get_scale_factor into a consolidated x_get_scale_factor that is exported by the rif. - Simplify scale inferring logic (see note below). * src/w32term.c: - Simplify w32_get_scale_factor in a similar way (see note). - Add it to the rif. * src/nsterm.m: - Just add NULL to the rif since there are no uses of any scale factor here. Clients are expected to interpret a missing API as meaning scale factor = 1. Note: 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. Best regards -- Carlos --000000000000e1a1720594fa8608 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Expose-scale-factor-through-the-redisplay-interface.patch" Content-Disposition: attachment; filename="0001-Expose-scale-factor-through-the-redisplay-interface.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k1sf5vwx0 RnJvbSA0OTRiMjg2NGU5N2Q4MDM1MzY1YjMyMDc5ZTA5NDlhNzYzM2MzMzM4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBtZW1lcGxleCA8Y2FybG9zam9zZXBpdGFAZ21haWwuY29tPgpE YXRlOiBUdWUsIDE1IE9jdCAyMDE5IDE5OjE0OjAzIC0wMzAwClN1YmplY3Q6IFtQQVRDSF0gRXhw b3NlIHNjYWxlIGZhY3RvciB0aHJvdWdoIHRoZSByZWRpc3BsYXkgaW50ZXJmYWNlCgoqIHNyYy9k aXNwZXh0ZXJuLmg6IGFkZCBnZXRfc2NhbGVfZmFjdG9yIEFQSS4KKiBzcmMveHRlcm0uYzoKICAt IFVuaWZ5IHVzYWdlcyBvZiB4Z19nZXRfc2NhbGUgYW5kIHhfZ2V0X3NjYWxlX2ZhY3RvciBpbnRv IGEKICAgIGNvbnNvbGlkYXRlZCB4X2dldF9zY2FsZV9mYWN0b3IgdGhhdCBpcyBleHBvcnRlZCBi eSB0aGUgcmlmLgogIC0gU2ltcGxpZnkgc2NhbGUgaW5mZXJyaW5nIGxvZ2ljIChzZWUgbm90ZSBi ZWxvdykuCiogc3JjL3czMnRlcm0uYzoKICAtIFNpbXBsaWZ5IHczMl9nZXRfc2NhbGVfZmFjdG9y IGluIGEgc2ltaWxhciB3YXkgKHNlZSBub3RlKS4KICAtIEFkZCBpdCB0byB0aGUgcmlmLgoqIHNy Yy9uc3Rlcm0ubToKICAtIEp1c3QgYWRkIE5VTEwgdG8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