From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: "Fix" sag scaling for hidpi Date: Sat, 13 Feb 2021 16:08:34 +0100 Message-ID: <87h7mgovil.fsf@gnus.org> References: <9C04F72C-1BB6-4308-AD8E-4A2B471CAC4E@gmail.com> <871rdkte4f.fsf@gnus.org> <87h7mgqj60.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5295"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Yuan Fu , emacs-devel , Eli Zaretskii , Robert Pluim , monnier@iro.umontreal.ca To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 13 16:10:05 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lAwYf-0001Gv-1D for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Feb 2021 16:10:05 +0100 Original-Received: from localhost ([::1]:57566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAwYe-0002X2-1U for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Feb 2021 10:10:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAwXR-0001vD-RT for emacs-devel@gnu.org; Sat, 13 Feb 2021 10:08:51 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:39642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAwXQ-0008Jo-21; Sat, 13 Feb 2021 10:08:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sfvGzZ0RyFC9m3V4+VyZ4fzppstWoenD03wJwl5lpRE=; b=Mf5Tll0967SqmvL8uycXiA3vC5 Hky+2x4qMa0UCGBfaIIVQk2I+Ywure4zn3J0xR0GOkb8Dn9PabfUQwch/tXdGDMP60b7W6e3ZmvEP CxpoQ9VEktcwF4fmm0z6xx1UNbIRz9fmwdOcoy32P+S5f1/9t5a1aa/Kh32p2tdb8jI0=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lAwXF-0006eI-4h; Sat, 13 Feb 2021 16:08:43 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJFBMVEWMa0mOemSXmWhx g0RrZk3S0LNcUzhGNiwnHRk2KyWDXzz////YFlUIAAAAAWJLR0QLH9fEwAAAAAd0SU1FB+UCDQ4u BuoNKj8AAADNSURBVDjL7ZA9CsJAEIU3/iBYqWAvk6wHUA8gYmG9ZK0FJWJn5SYXMJNOQbKztzWW OnMABb/yffse7Kho+MZgBDN4oT6BeL4Cs+AiTvbN+ykX7bgpaDNhopMlK6MtF2qdAGjDc9WCBISl hhGAmP8+wwOIeQ/dQxQn52gnCXd07izkHV9cfM3z1tbnzhOv6LSkOlDJhE2rcAlUcbENZUEoiBSR CIUpg5UXRF9bwoB4ZY2uzbFAvPGP2LxyiEsuxptm6i6cJJrW60z9+U6iJ1pEOZ4NtRAfAAAAJXRF WHRkYXRlOmNyZWF0ZQAyMDIxLTAyLTEzVDE0OjQ2OjA2KzAwOjAwQs/GbQAAACV0RVh0ZGF0ZTpt b2RpZnkAMjAyMS0wMi0xM1QxNDo0NjowNiswMDowMDOSftEAAAAASUVORK5CYII= X-Now-Playing: Nettle's _Unciviliz_: "Ensamblaje" In-Reply-To: (Alan Third's message of "Sat, 13 Feb 2021 12:54:50 +0000") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:264633 Archived-At: Alan Third writes: > Ah, I've misunderstood how GTK deals with scaling. I could've sworn > someone said upthread that SVG images are shown at double size, the > same as on macOS, but apparently not. I tried loading the splash.svg file, and it's displayed here the same size as the splash.png file. Debian bullseye, HiDPI, scaling factor of 2.3, so the 333-pixel-wide image is displayed as a 760-pixel-wide image: (insert-image (create-image "~/src/emacs/trunk/etc/images/splash.png")) (insert-image (create-image "~/src/emacs/trunk/etc/images/splash.svg")) > So we have the situation where on macOS everything is shown at logical > size, unless you specifically ask for it not to be, and on GTK > everything is shown at physical size, unless you ask for it not to be. > > And they both use "scale factor" for these same things. > > What does the PGTK port do? The same as XGTK? This is a Gtk Emacs, but not a pgkt Emacs -- I haven't tried the pgtk branch... > Nope, it's the same as on macOS. > > So on macOS and PGTK we want to use the scale factor to scale down > images so they are displayed with physical pixels, and on XGTK we want > to scale up (UI?) images so they are displayed in logical pixels. > > I'm somewhat inclined to ignore XGTKs desires, especially as it seems > it may be removed once PGTK is merged. It sounds like confusion born out of some architectures reporting sizes as logical pixels, and some as physical pixels. That has to be fixed, or we'll just confuse ourselves even more. :-) >> Uhm... but on Macos, Emacs doesn't know the physical pixel size, I >> think you said earlier? So... er... now I'm confused. :-) > > It's something you have to go looking for specifically, usually > through multiplying by the scale factor. The reason I said I wouldn't > want Emacs to convert everything to physical pixels is because every > single size would have to be multiplied or divided by the scale > factor, and then Emacs would appear to be half the size of every other > app (font sizes would be half what they are in the terminal, for > example). I don't follow. This Gtk Emacs is exactly the size I want it to be, and it computes everything in physical pixels. If the OS expects logical pixels, then we scale before asking the OS to do something -- this is how Gtk menus are computed, for instance. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no