From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: What is the proper way to scale fringe-bitmaps for high-DPI displays? Date: Wed, 20 Mar 2019 15:37:19 -0400 Message-ID: <129186e9-cd69-a706-8411-126cbff16c64@gmail.com> References: <4be02093-6e31-bfde-7d11-5900c7e02668@gmail.com> <83pnqlsb8l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="75394"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 20 20:38:18 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6h2W-000JRx-53 for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 20:38:16 +0100 Original-Received: from localhost ([127.0.0.1]:52313 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6h2V-0003Aq-5Z for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 15:38:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6h1j-00039R-Ua for emacs-devel@gnu.org; Wed, 20 Mar 2019 15:37:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6h1f-0008EO-WA for emacs-devel@gnu.org; Wed, 20 Mar 2019 15:37:25 -0400 Original-Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:34704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6h1d-0008Af-Vs; Wed, 20 Mar 2019 15:37:22 -0400 Original-Received: by mail-qt1-x82b.google.com with SMTP id k2so4029141qtm.1; Wed, 20 Mar 2019 12:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LjANwnwsXjQ6sXkhCY6LTlRV2QiWBHBhJXCBtEZZRqg=; b=hSZ7mZJNN80K3PbIruPMyaa3Arlb/BN116hwwFGbgcq/P4bucsT6UijvRw8nRqDQTm 6KeEtwG4T4YEBm+AsRqZt2s/FxW8jdT602Hpr2M2wZQGgDpbnmnDmUWJC4X4Np0xt4BB 78ZN5CHmQ0U/CSncOVCOyREf5nOCGzK8dtc1YIRNQ/OtCyxsrZYFuIVAiTtA6AO4Ahct OhdJDITUpxPOerxs9peTvLsFB4J8ntx68Q63z0xYZsVQ1p1hFJNvmC3HwMzHesYmYn5w ZGYwRBzSNLDqpwgCibhCMmf7vXsdM8pI3qk05eMjLoW27D8O57JKSkJowPo71QApmEpu k9tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LjANwnwsXjQ6sXkhCY6LTlRV2QiWBHBhJXCBtEZZRqg=; b=RLFWdL7pvtwN6EL0RaOq9K0cz5Ed6jabRGx+qTL+dtufonF537/Cwk3OQi0a37+F2W 6lQFqzPFHXMui01YWgmRXWMSBUh5hwLzyepZpQ903DoDrPNblAe9ghfOgFbWINLfDy6E OUQMz2ICBmHJTqgR8UVCD1SAkvj1E6FhZFgP3qsPxRN0bb90cIHfpH0Q8ikDGe2S+ScS Qs1MHkSar7jQq0h99Oghd5Ie1n6kr+TDDwIAdPHwnoj2MYH7ByTnZr/qICV8rfo1r0N4 djkGXG43klk/13Bv2fZP9JqawP3lsBeg03VsHN8b6l3nxXMtV2bZQJa1FBbdy6oTydAn Vejg== X-Gm-Message-State: APjAAAVdYLDx/5S3/OHPgT0Ufq9XHSnrN4toWe5dnSxUdj0sfQWyINXe zFO8OTnrEoHBuZSwRy1YkPIGmsQ1 X-Google-Smtp-Source: APXvYqzKFu1OwYZkhmC3B+iZxF2T84cE+CGOU2+ItTb/Px3is6rOSEpRYz1OWkenXigDhEDMzidqXw== X-Received: by 2002:aed:2572:: with SMTP id w47mr8394933qtc.21.1553110640818; Wed, 20 Mar 2019 12:37:20 -0700 (PDT) Original-Received: from [128.30.9.213] (30-9-213.wireless.csail.mit.edu. [128.30.9.213]) by smtp.googlemail.com with ESMTPSA id w62sm1622101qkd.56.2019.03.20.12.37.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 12:37:20 -0700 (PDT) In-Reply-To: <83pnqlsb8l.fsf@gnu.org> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234419 Archived-At: On 2019-03-20 13:32, Eli Zaretskii wrote: >> From: Clément Pit-Claudel >> Date: Wed, 20 Mar 2019 10:55:43 -0400 >> >> Users on Flycheck are complaining about poor readability of our fringe bitmaps on high-DPI monitors, as the bitmaps look tiny on such screens. An easy fix is to double the size of the bitmap, but it leaves users of low-DPI monitors in the cold. A trickier fix would be to dynamically detect the current monitor's density, and pick the appropriate bitmap accordingly, but I'm not entirely sure how to do detect these high-DPI monitors: >> >> - x-display-monitor-attributes-list seems OK, but looks more complex than what we need (based on looking at the C code) — is it OK to call it repeatedly to figure out the current monitor's density for a given frame? > > That'd be very inelegant, IMO. > > Instead, I think when a frame is created, we should record its > high-DPI state in the frame structure, or maybe in the frame's > parameters, and then use that when we prepare the fringe bitmaps for > display. In addition to my previous message, I should add that other parts of Emacs would likely benefit from this as well, since we have code (see cb73c70180f57f3fb99fae3aaefbacf0a61cea3f) that computes DPI values in gamegrid.el. Cheers, Clément.