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 16:05: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> 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="11970"; 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 21:26:35 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 1h6hnD-0002zY-TF for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 21:26:32 +0100 Original-Received: from localhost ([127.0.0.1]:52757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6hnC-0004oh-OG for ged-emacs-devel@m.gmane.org; Wed, 20 Mar 2019 16:26:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6hkV-0002db-Lu for emacs-devel@gnu.org; Wed, 20 Mar 2019 16:23:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6hTD-00012I-MN for emacs-devel@gnu.org; Wed, 20 Mar 2019 16:05:52 -0400 Original-Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]:33904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6hTD-000125-9w; Wed, 20 Mar 2019 16:05:51 -0400 Original-Received: by mail-qt1-x834.google.com with SMTP id k2so4141554qtm.1; Wed, 20 Mar 2019 13:05: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=bMeTbqZfw8A6GkU7nhcCqHPAxRnYt2+3jKhfD6MstuU=; b=uRDRPDeUBMywJwXwocuQPyCplyiMzW4c/bRC8aQTPleoBwcwmX1UVdMBkmVLb+/0c4 M++iN0IeITiQpkvjb3oT3jIRq1sWlUkpXTD9EmULNsJdHX9gN1T0GaEQsrhSxEq+9N2H kFnxmiMv250CJlyQPjDRrOHX3LMGNbqo72ITp9Oz1WUF1K/TT6PWI+GrRdSYr5PmqF+H lGoVhsKLDdfZeid6FOHIhoYj+jWet/0r1MF8bJJuOY+LGJNSbF/+yTSJWxGjj/boAp86 oQ8kiTKUp0O28ddbyuwGUv6hMqFVm3wIQEwkyBuTYiPRMgFpdBAOHX0qyWtH3cDUw8hc QKAg== 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=bMeTbqZfw8A6GkU7nhcCqHPAxRnYt2+3jKhfD6MstuU=; b=F3jPhbqz6STPzPpVeFLfFZr3X5UJ760o4ineahAj2MxDG8/GDRCngafgxTD86kseNf dMwmifcADxeGW9kd/l8406MZWkxIfY1nAk6L2q5WoG5G9RddVwL9joFxe7q6v2uiy8Uj 4foDLHs9oixJJjZ+zCuwwslTxBEeBl/V0VKzl8CSvwXh3qAjyWf79lyArhZhvKdy42ON pEpd2QgxUtt9XymJxNo62bEsqjbqG2zU1tJHr4T3lqPW4JdDU8QJqOgMKS0/lleAUaPg nAPJpL4z73iOQsX3xctz3/7xDpAidHASmV+PwD2MRspiCkw7XlCacgYjVc+S2vBt7Yvd p0XQ== X-Gm-Message-State: APjAAAUUIR8Ssps70mV7AkgYQL4RBFLIXJ+xmfzPfX/3GdPjflFUF6jG nOSlfUeIjWJ8A9VRHXjdhoFOxEmI X-Google-Smtp-Source: APXvYqx9UzJLiAKLe4ROMCu8qRDUW/wf8555P97oOnymMnbMZ7464V75QIZVicQ0c4pyELgDyYJfog== X-Received: by 2002:a0c:81d4:: with SMTP id 20mr8786799qve.2.1553112350464; Wed, 20 Mar 2019 13:05: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 q75sm1686831qke.17.2019.03.20.13.05.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 13:05:49 -0700 (PDT) In-Reply-To: <83h8bxs53y.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::834 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:234424 Archived-At: On 2019-03-20 15:44, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org >> From: Clément Pit-Claudel >> Date: Wed, 20 Mar 2019 15:34:26 -0400 >> >>> 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. >> >> That would be nice. In fact, we already have code to detect high-DPI displays in C, in x_get_scale_factor in xterm.c (used to scale wavy underlines). Would the way to go be to record the value returned by this function in the frame's parameters? > > The frame's parameters is a better way if we think such a parameter > will be useful to Lisp programs, and calling a function for that is > too much overhead. Otherwise, a simple field of 'struct frame' will > be somewhat less hassle, because you don't need to mess with the likes > of frame-parameter to teach them about this new parameter. But either > way, the job is not hard. Oh, so Emacs' C code would scale the bitmaps? I expected the Lisp code would do that.