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: Thu, 21 Mar 2019 13:40:48 -0400 Message-ID: References: <4be02093-6e31-bfde-7d11-5900c7e02668@gmail.com> <83pnqlsb8l.fsf@gnu.org> <59f034d0-3473-0a83-ccf6-1a6fe446964c@gmail.com> <83h8bxs53y.fsf@gnu.org> <83ftrhs3lu.fsf@gnu.org> <83ftrg6gxm.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="162389"; 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 Thu Mar 21 18:56:08 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 1h71vE-000g7p-2F for ged-emacs-devel@m.gmane.org; Thu, 21 Mar 2019 18:56:08 +0100 Original-Received: from localhost ([127.0.0.1]:43892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h71vD-0005Ea-2n for ged-emacs-devel@m.gmane.org; Thu, 21 Mar 2019 13:56:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h71sI-0002PN-Bp for emacs-devel@gnu.org; Thu, 21 Mar 2019 13:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h71gR-0000IA-Fu for emacs-devel@gnu.org; Thu, 21 Mar 2019 13:40:52 -0400 Original-Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:35130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h71gR-0000GC-5o; Thu, 21 Mar 2019 13:40:51 -0400 Original-Received: by mail-qt1-x82c.google.com with SMTP id h39so7592804qte.2; Thu, 21 Mar 2019 10:40:51 -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=7sQEHQs/o+tZg/jC94Uy+6neluRHFobyTG7GQaPsXvA=; b=a2wIBJmHkZ3pdB3NVQipSCW2sZsNgOv8lxgA/u9Oi64eb4oTLNWrZzOU76ShsfXcie SmiZKAf5RH+J0g0FlD+gHHV3nTsBUy9SqEiFZcor5g+dgfIODB2vftWa2T73DeAiaBvy qihr7uJz+M6QcCfNP8m4FQkZfmlQ3/oaRtzBMQoD4JksfdeyR+HawN8udKIm532vrjgt 5TkbE9w69krYUb9lsurNNMPoCtV4Dl/IdOU9pN4VktGlXYCA8dxv+5d9DwqyLgL6sTMJ 1ILRaIWN9blPeqJ60RCNiDAfe5LWpWEqzfK4Be2Y40RyouHHILPEu8zdFMYYfxPOI4Rv lbXg== 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=7sQEHQs/o+tZg/jC94Uy+6neluRHFobyTG7GQaPsXvA=; b=kk2/Y5Xbxk3Cs7A9vNCg6JXEHPYVe+wBJNNQVX7wlYoM/fICH+cjmPOEAb1/2/S6Of H7NUYQRoxkso4jAt5UOvTEPyCVZoj2eCRWI34DzC8mF7wjSzOk82xkzbED/UBespHrV+ h1gsI9k8ci+CHVVL4GTeW+/0DnPuvO1YTrccON++4bTHnCFMwVJS9e2GZSY2L73HvUeH rzFWbbQWzlvdfuxu5vI8/+r3xjwGi5U4km72pqddNFcC1dsOqe9rCSMHKmDtrec/9jE+ 0abFazKtWr2T5rDnCQABKR+NcgeAdnug07cpcTn+FCdCWzxXLajmFDue4DIiRVbzcE/5 f6aw== X-Gm-Message-State: APjAAAV/gU/6XJtQFUYrbANVlLy1D6BPBjPcnMgy0IknxgtuItjHlTA8 7U0ClcVWy3KcnhKHZSUg7hizdWys X-Google-Smtp-Source: APXvYqyzmFRKHE4LzS1w4wgEdGeQ6FTX1w0k+Kd2PaGtHLBBW37ChG+FaGeJfWCIe+nBay98Kk4y8g== X-Received: by 2002:a0c:c138:: with SMTP id f53mr4208204qvh.76.1553190050357; Thu, 21 Mar 2019 10:40:50 -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 v24sm3148932qkj.40.2019.03.21.10.40.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 10:40:49 -0700 (PDT) In-Reply-To: <83ftrg6gxm.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::82c 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:234472 Archived-At: On 2019-03-20 23:32, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org >> From: Clément Pit-Claudel >> Date: Wed, 20 Mar 2019 17:17:16 -0400 >> >>>> Oh, so Emacs' C code would scale the bitmaps? I expected the Lisp code would do that. >>> >>> Fringes are displayed in C. Doing this in Lisp will produce >>> flickering, I'm afraid. >> >> I thought the C code would read the scaling factor and set the bitmap accordingly just once, when creating overlays or applying text properties. > > But you were saying that a frame can move from a high-DPI terminal to > a low-DPI one, which seems to mean we cannot compute that just once. True, but I wouldn't be too unhappy if switching from high to low DPI (or vice versa) didn't work so well. I also don't know if it's actually possible to have different-DPI displays on GNU/Linux systems. > And besides, there are fringe bitmaps that we display regardless of > any overlays and text properties (e.g., truncation and continuation > indicators), which are displayed directly from C. Good point.