From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kai Ma Newsgroups: gmane.emacs.devel Subject: Text shadows Date: Sun, 12 Mar 2023 12:06:28 +0800 Message-ID: <72650A07-DEC8-4E08-A524-5C7AF804F3CB@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) 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="12483"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 12 05:07:50 2023 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 1pbCzs-00032U-Uf for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Mar 2023 05:07:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbCyt-0007M7-T2; Sat, 11 Mar 2023 23:06:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbCys-0007Lj-9z for emacs-devel@gnu.org; Sat, 11 Mar 2023 23:06:46 -0500 Original-Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pbCyq-0001jh-I5 for emacs-devel@gnu.org; Sat, 11 Mar 2023 23:06:45 -0500 Original-Received: by mail-pl1-x644.google.com with SMTP id p6so9683738plf.0 for ; Sat, 11 Mar 2023 20:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678594002; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=pyJFAJpugRxLGCGTnpuOm2Zf5ebVQClaZPksOUp/W+Q=; b=cazwMOv2qWALpVyT778e4Ap1ctNvv45PCiO7D+Y1TIfIYAs+1i18Fm7IA/iwDYapzk sn70uKvpd+8SAAHrfo5UVmVTwuWPAOp67X0lis07hiNWABA5TcZRlR+FoMkWzPi/CMj6 wpC9/mhqq7gbEUT0yz3FMuOyBlaosKfhqfvX3aZ/n/Q/3BTAjw6cGRJ9DJRFqJ4H/Mmv a5Q9RJ/a+7odde4RalI/63qoVe/5Kae3zaHXscS1d8VH+nmX7BxYBOBCXq5CHuu1a/T6 0C8/S+XVRyaugELoGxMhYn1c1vaRmYcEaczkDIPchi9DNumseIcx2NGUGfYyzcpYRNeW gSWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678594002; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pyJFAJpugRxLGCGTnpuOm2Zf5ebVQClaZPksOUp/W+Q=; b=pPLO97864te3gzGh9ulvXb7T+FMSRmX9WSV/6atPVqsWHwA7m+evgHai22vgg5HKDx 47O/kQ2XvC4sT/S4s+TwI5TEsZe30aaEdMASxdNurrldjYk4NQhoBWk+9R8/qfPbYVDG Yjcc9/3uW9C5Pnci/mX4eErK9nZl7O8876SYqeyXLOWjRwYARihw8L1J0gXju6NAOc4s JFq1Sh35CFObN2NJ3wUCBsi9LJXjUHtJQ4I3Dpfs+WEucvHeLrMomFmrSHdPW33gbdSr GqMnpWgf2WgHQtXwlfRqNDFphN016hFGQJ54sZMHccdY2BHhEUWJaqsU60r+PUNn+v4B QwfA== X-Gm-Message-State: AO0yUKX38+ZN1jemZAVZN2A2sdHDs0AhzT+R7RPR04fqBxzt01qmgVOa X6M1K3jDkBbizswnmKV1+JhNi1OW7pOsWm/7uBg= X-Google-Smtp-Source: AK7set+6l8SM9eEpdfQ2EAd74RPPyI+DyJIv/E+B5WgNih1IHzQtZoKxXnFZfD5vxMB9UNYysmkJ1Q== X-Received: by 2002:a17:903:1252:b0:19f:31cc:47fc with SMTP id u18-20020a170903125200b0019f31cc47fcmr2916427plh.39.1678594002148; Sat, 11 Mar 2023 20:06:42 -0800 (PST) Original-Received: from smtpclient.apple ([2404:c800:922f:d3b:9cf2:fcff:fecc:2ed2]) by smtp.gmail.com with ESMTPSA id r20-20020a17090b051400b002376d85844dsm2112696pjz.51.2023.03.11.20.06.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Mar 2023 20:06:41 -0800 (PST) X-Mailer: Apple Mail (2.3731.400.51.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=justksqsf@gmail.com; helo=mail-pl1-x644.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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, FROM_LOCAL_NOVOWEL=0.5, 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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304346 Archived-At: Hi emacs Recently, I implemented the =E2=80=9Ctext shadows=E2=80=9D feature for = Cairo-powered windowing systems, including X11 and Wayland. See [1] if = you wonder what that looks like. This feature adds a new face attribute :shadow, and accepts values like: - FLOAT how much blurring? - (FLOAT . COLOR) additionally, specifies a color for the shadow - (FLOAT COLOR OFFSET) additionally, specifies an offset (x . y) This was first implemented for the NS port three years ago (also by me), = and seems to have sparked some interest and was discussed on emacs-devel = [2]. (I didn=E2=80=99t follow the discussion on emacs-devel back then.) I=E2=80=99m writing to ask if the community is interested in accepting = this feature into mainline Emacs? If so, I will improve things and make = a formal patch. Also, I=E2=80=99d like some feedback on the design and the = implementation [3]. The Gaussian blurring function used GCC vector = extensions. Is this allowed in the Emacs code? There is also a known issue regarding text extents (?), and I=E2=80=99d = like to know what is the correct path forward: 1. The shadows sometimes should be drawn outside the glyph extents, but = they aren=E2=80=99t drawn. 2. Previously drawn shadows are not cleared, and they even accumulate. = This can be observed with blink-cursor-mode enabled. Any input would be greatly appreciated! [1] https://github.com/ksqsf/emacsmoe/pull/1#issuecomment-1465072298 [2] https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02921.html [3] https://github.com/ksqsf/emacsmoe/pull/1/files=20 =E2=80=94 Kai