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: What is the proper way to scale fringe-bitmaps for high-DPI displays? Date: Wed, 20 Mar 2019 10:55:43 -0400 Message-ID: <4be02093-6e31-bfde-7d11-5900c7e02668@gmail.com> 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="179460"; 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 To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 20 15:56:39 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 1h6cdy-000kZF-EW for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 15:56:38 +0100 Original-Received: from localhost ([127.0.0.1]:49115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6cdx-0005QE-FC for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 10:56:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6cdL-0005Ng-4n for emacs-devel@gnu.org; Wed, 20 Mar 2019 10:56:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6cdI-000159-Vl for emacs-devel@gnu.org; Wed, 20 Mar 2019 10:55:58 -0400 Original-Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:36978) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6cdF-0000we-5L for emacs-devel@gnu.org; Wed, 20 Mar 2019 10:55:53 -0400 Original-Received: by mail-qt1-x82d.google.com with SMTP id z16so1404557qtn.4 for ; Wed, 20 Mar 2019 07:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=mOnOHRN5ZVNdaSlfpttIxxN6ozlVJrRtC21jfREZeDU=; b=UHklxsLAmJI92G9vV/gdrkOZrihziIKKVgTAO0JdfHN4iTHaCnUDR+TysmEMJpodSQ H9JYPQ4yN4ezhAYsrtpYtk149QhHoRznZDZF1NEk2mv68ZnB/OCcIzo/5XXA/QqGuyxB TQdmUhIBe/+YW9koPPS9wXjGPS1UZV60A3yd535YatZbTTLmLL8kaz5wvQU/1zOQlalN eTY9Ps998QDYkfYNrOWBBuzBwxzvHFTkcykKDzvyHebNx5FsCFtHBsvaqOrF9ngAlxoK 2U1uhib6Z6PcCV+Ti1sUFQRbkzdB0zCTgyJ3qBSSwB2xgVo99/2wHvInka3p7CFf08lO i8hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=mOnOHRN5ZVNdaSlfpttIxxN6ozlVJrRtC21jfREZeDU=; b=Ypi9wf9KEGswjLbkR0Um9mUYhW8g95Ri23GdIIgWCSo1fIpd5vX5xN8Twm5WhNO3a5 VHCa3atGzBuKW3Dqcc376H//ODABpNdOAhszeenFziBscaqgvfAKEp3oOLfqDZaj5Asl Jkdksqd+zxNDLrB4G7BjuBzeHxIYtnoMFk/Cs0kWD+sxjbGhEUBnj+Z5A6QUtBM5r/lI 1TKtNT1H5BFU9M3KWbZ+JGrWtgxkf8SDgd+9bkPkCsDAID589hbgqGocGwfFAmoNiUQh WJJsxdfnl18w/rNTM4MWwwyfOrZ3cJCzbXT8Aery5pkqrYi+bHsI2VgJc1SK8tg1bFdH 0kUg== X-Gm-Message-State: APjAAAWzTqy6fPvlGb/KxJA4vxwGoYnUmKXzdTEpBQvaNDc+ZBQKwXoW TOL2r6GcpGo1XxwDsArwTPYGhDzI X-Google-Smtp-Source: APXvYqx2V9VIVjc1tmn0r9oABjEWjiUEubKj2TDiEkSNl/hg1eETowGS8ZIyaxMfjs0yGb8il3+lFA== X-Received: by 2002:ac8:f86:: with SMTP id b6mr7407191qtk.330.1553093745916; Wed, 20 Mar 2019 07:55:45 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:3036:a182:aef4:ab38? ([2601:184:4180:66e7:3036:a182:aef4:ab38]) by smtp.googlemail.com with ESMTPSA id h10sm2099361qta.3.2019.03.20.07.55.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 07:55:45 -0700 (PDT) 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::82d 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:234409 Archived-At: Hi all, 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? - x-display-pixel-width and x-display-pixel-mm seem simpler, but the documentation says 'On "multi-monitor" setups this refers to the pixel width for all physical monitors associated with TERMINAL.'. What does this mean? Also, how do applications typically deal with frames being moved from a low-DPI monitor to a high-DPI one? Is that an issue in practice? Thanks! Clément.