From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: "Fix" sag scaling for hidpi Date: Sat, 13 Feb 2021 21:06:57 -0500 Message-ID: <2626112A-130C-4AF9-9419-C09E7E61F1A3@gmail.com> References: <9C04F72C-1BB6-4308-AD8E-4A2B471CAC4E@gmail.com> <871rdkte4f.fsf@gnus.org> <87h7mgqj60.fsf@gnus.org> <31b44f0b-c8a4-284e-835e-89c84e8407d4@yandex.ru> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12054"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third , Robert Pluim , emacs-devel , monnier@iro.umontreal.ca, Eli Zaretskii , Lars Ingebrigtsen To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 14 03:07:50 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 1lB6pC-000341-0n for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Feb 2021 03:07:50 +0100 Original-Received: from localhost ([::1]:41478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lB6pB-0000gd-2b for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Feb 2021 21:07:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lB6oQ-0000Ck-U3 for emacs-devel@gnu.org; Sat, 13 Feb 2021 21:07:03 -0500 Original-Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:37365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lB6oP-0000YB-6g; Sat, 13 Feb 2021 21:07:02 -0500 Original-Received: by mail-qt1-x82e.google.com with SMTP id v3so2609689qtw.4; Sat, 13 Feb 2021 18:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=asu1HuxhX7F8S8MhgfH1r8I2hE2mlEFQ7NP/8gpTZrE=; b=QnsRpGKlShkzBqZcx1Xchol5N8Nb0K+yx4GjfumAqfchfK2r2upN7IGBIk6RwnwoFU RUp54vZSSYIMICz/ghBjRmg2F/Cc0oV7NCuYyQJQk6xqqdej3gD59cHxDb8gyT1oRICI oGkRvsax37tc/LgWC0Oh+as768lLdRLjrK95A8LCETh3pn14KLVrL62EguS4t6dHQivX HrgussOTnnZDgm4e0NYlcUfdfjXQsLl0mUkdnXocQaUtq+Gtr3I0j0l6ifY9OrRMJz7D 8eqMThTVd84KH5FxEIwwT0y6HqDgf8ZuXkm1X7MWXfabccgSop5tba74YcR9g+nK0JdD W0Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=asu1HuxhX7F8S8MhgfH1r8I2hE2mlEFQ7NP/8gpTZrE=; b=CoLNiBFiOJRwzAHX5yN0hPFphymh+oTR7vPGyONZE6UjULY09z0rilF8D4Y2ubwZrE qD9B1daVT+DNjUIBPR0n1o3RWyYhXa5eReAAA41uDtc0kUsy+H73LVLiGn6C407MWzkW rRfBi0V6Bl2wpfpFh5tRUbcAIIjP4Bwz3NNA7S/SfFWPsd8Ln7EbSbb/79Q+7bh+mejm gSoJossNdrLyEb9pZ8vdPTC1WLBAbQD/q7PdNCo/kd2wt+r6Kq6xmC25sEZUykUydT4J J+TKfJ/1fuYKogmuXqYbiOtUOxbkP5y9HMm3Oj6MGDw90QdQD+jEZ3EKZIutqCiRbZjT eNpA== X-Gm-Message-State: AOAM532P7gPB38+oPbIy4BTLy3Tp5jv0EXz40ifqjfO8OFZ0v5QUUxtM iLYYywil0IK8LVS/pdjPV9o= X-Google-Smtp-Source: ABdhPJwzfjYxfS3T4/ieCykGmo54ciNtv1sAZsTxwwzt0knUo3l2eubx1swKYrIGdMlKpQgdZgzVow== X-Received: by 2002:aed:2845:: with SMTP id r63mr8877233qtd.386.1613268419474; Sat, 13 Feb 2021 18:06:59 -0800 (PST) Original-Received: from ?IPv6:2601:98a:4102:3d80:f10e:a56d:6e33:e337? ([2601:98a:4102:3d80:f10e:a56d:6e33:e337]) by smtp.gmail.com with ESMTPSA id k8sm1691306qkk.81.2021.02.13.18.06.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Feb 2021 18:06:59 -0800 (PST) In-Reply-To: <31b44f0b-c8a4-284e-835e-89c84e8407d4@yandex.ru> X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=casouri@gmail.com; helo=mail-qt1-x82e.google.com 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, FREEMAIL_FROM=0.001, 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:264675 Archived-At: > On Feb 13, 2021, at 7:02 PM, Dmitry Gutov wrote: >=20 > On 14.02.2021 01:14, Alan Third wrote: >> On Sun, Feb 14, 2021 at 12:50:26AM +0200, Dmitry Gutov wrote: >>> I noticed the pgtk and the GTK3 builds render them in different size = at 2x >>> scaling. Basically, pgtk scales (and renders them kind of fuzzily) = and GTK3 >>> does not. I wonder if their rendering could be standardized as well, = and >>> whether the same approach could be used to avoid fuzziness. >> Really I think we should be providing hi-res, or vector, versions of >> the fringe bitmaps for hi-dpi screens. >> I'm not sure if we can just swap in SVG files for the fringe bitmaps >> on systems that support them... Fringe bitmaps are special in some >> way. >=20 > But couldn't we use a non-fuzzy algorithm to scale them, at least as a = fallback? If the bitmap is all 1s an 0s, scaling by 2x could just double = the lattice instead of doing the linear scaling. >=20 > Or there might be other scaling algorithms as well, if people feel = that that approach ends up looking too "blocky". >=20 > There are an infinite number of possible scaling factors, so providing = a high-res version for all of them is probably out, but some vector = format sounds like an interesting possibility. As long as it's feasible = to generate programmatically, because that's what I'm doing with a bunch = of fringe bitmaps in a certain popular minor mode. You can definitely generate SVG=E2=80=99s with sag-mode. For example, to = generate a downward arrow: (let ((svg (svg-create 9 9))) (svg-polygon svg '((0 . 0) (9 . 0) (4.5 . 9)) :fill "black") (svg-image svg)) Yuan