From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#37770: [PATCH] Expose scale factor through the redisplay interface Date: Thu, 24 Oct 2019 11:19:24 +0200 Message-ID: References: <838spf61ew.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="1536"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37770@debbugs.gnu.org To: Carlos Pita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 24 13:21:05 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 1iNbAt-0000Bp-Id for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Oct 2019 13:21:03 +0200 Original-Received: from localhost ([::1]:39750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNbAr-0002AB-Lv for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Oct 2019 07:21:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45585) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZHn-0005kj-9H for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2019 05:20:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNZHl-0000NH-Ur for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2019 05:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54754) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNZHl-0000ND-R4 for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2019 05:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iNZHl-0001TY-K8 for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2019 05:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2019 09:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37770 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37770-submit@debbugs.gnu.org id=B37770.15719087765638 (code B ref 37770); Thu, 24 Oct 2019 09:20:01 +0000 Original-Received: (at 37770) by debbugs.gnu.org; 24 Oct 2019 09:19:36 +0000 Original-Received: from localhost ([127.0.0.1]:35342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNZHM-0001Sr-DB for submit@debbugs.gnu.org; Thu, 24 Oct 2019 05:19:36 -0400 Original-Received: from mail-wm1-f65.google.com ([209.85.128.65]:54401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNZHJ-0001Sd-Rl for 37770@debbugs.gnu.org; Thu, 24 Oct 2019 05:19:35 -0400 Original-Received: by mail-wm1-f65.google.com with SMTP id g7so1929196wmk.4 for <37770@debbugs.gnu.org>; Thu, 24 Oct 2019 02:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=rZIGIXwsUb1DhJAsVcN3peAbsNniFvvCWbvZqmgSCWk=; b=McC77G27QilbKtzVkYPGhZXaX5oVZPChApEHBduFOneTppldQ55WmK8jK5iI5F5KLs gZu8FTn798oCukxBLd40B+XG0PuGqECgzlujmFXze5v5cXIyUip4O6VtVM3EjGiswo00 LECV3Utl/fh31Hl2TNC3UTDJ1ho+c6mmKsYnlLPoDDd8GrlpglCruf8Vg46sytkZZ4IL ltkSqLvEp/KdTj09srKt/Pr7C36CvrMTOS787eD1kMIndF0Ys958gn3WQugJCj+tEHNj Yj/Oyr9kLqXxa4TxiYCYskggbZcivDPvIKkQxZY/jr6JkiMwJOfX1rkjh+mNjHgLz2R6 rdTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=rZIGIXwsUb1DhJAsVcN3peAbsNniFvvCWbvZqmgSCWk=; b=RY14XbLudD5zXpwBbeaTz5c8Y6m/0euqoxjSZB7JXORpRCbMzhNf3I6aDNjZF1PcOf ANZtKY0jOa8qmbFahT1vIQHIcOoNGFH2lOi6S+CWaknHApNQxutRI7sDB/eVclQX1hq1 QrQ+XniaxZSYM7WNWOVA3Ti6HLluQqdX4Ponpjz2iqKtccJ2fG3njIbsbjqbHOWBB21f Cg/C0/mYQJQ+8CcO5/bGXtOwVb9hDPK+1CowEt8+YGxFqgdZlAWEqinaPx2XR3Xrvscb lkdI41isyoqy+YUnUjIrcMORRWSF2rtY8Gog7XbiIDykRJ+FxMrBC9l7WcpsIH5pBjiJ eFdg== X-Gm-Message-State: APjAAAV10snFHez7GYISKaYjGllr/661U2QK7KT6QTiXMmKWqv06VQx9 m/UIE66kWtNetTDKUN5EjiBzu5Sa X-Google-Smtp-Source: APXvYqzpRhDFiyfZ66UlXmACy+Kz8UKZ+VpKvN5qOrv8gtBptKyTznw1ieVZLW/sRTEfCDtB6aKnyg== X-Received: by 2002:a1c:7c13:: with SMTP id x19mr3934612wmc.80.1571908767476; Thu, 24 Oct 2019 02:19:27 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id y5sm1792237wmi.10.2019.10.24.02.19.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 02:19:26 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Carlos Pita's message of "Tue, 22 Oct 2019 15:06:49 -0300") 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:170115 Archived-At: >>>>> On Tue, 22 Oct 2019 15:06:49 -0300, Carlos Pita said: Carlos> I've improved the code comment for the redisplay interface entr= y in: Carlos> https://github.com/memeplex/emacs/commit/d3c66e6eea8a3b6f1a269b= d968597a3bd8a3e811 Carlos> (to generate the patch, add a .patch suffix to that url) Carlos> The new comment states: Carlos> /* Return the scale factor for the screen containing frame F. A= ll Carlos> geometries are reported by the backend using a scale that is Carlos> approximately 96dpi x scale_factor. This scale may match Carlos> physical resolution or not. */ Two spaces after '.'. Also: "This scale may not match the physical resoluti= on." Carlos> Some thoughts: Carlos> One possibility for the (maybe distant) future, is that this sc= ale Carlos> factor api won't be needed any more. Like nsterm does (I believ= e), all Carlos> backends might expose a 1 x 96dpi interface so that the upper l= ayers Carlos> can work mostly or fully unaware of the device complexities. Bu= t at Carlos> this moment the xterm backend goes to lengths in order to rever= t gtk Carlos> auto-scaling and provide a "physical dpi" (well, not necessarily Carlos> physical, since there is still randr in the middle) interface = to the Carlos> upper layers, thus losing the benefits of gtk auto-scaling, alt= hough Carlos> with good reason since nowadays gtk is more of a hack to the x11 Carlos> backend, sniffing the underlying x event loop as it is, than a = proper Carlos> backend on its own. If emacs used only GTK to draw things to the screen, then indeed there would be no need for those conversions, as GTK would handle them. is attempting to implement a 'pure' GTK backend. I have no idea how close it is to being ready to merge. Carlos> Anyway, even if that's not the trend, exposing a higher scale f= actor Carlos> to the upper layers still has the potential benefit of letting = those Carlos> layers decide how to better use the extra available resolution, Carlos> instead of pretending they are drawing to a vintage screen. Whe= ther Carlos> this is worthwhile or not I don't know, given that font and ima= ge Carlos> rendering are the parts most profited from this extra resolutio= n, and Carlos> that fact every modern toolkit already exploits. In any case, a= t this Carlos> moment we still need the api because of the differences between Carlos> backends. You=CA=BCre right about that (although on macOS we seem to get by OK without it). Robert