unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
@ 2023-11-14 14:00 Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-15  9:59 ` Eric Abrahamsen
  2023-11-26  7:25 ` Visuwesh
  0 siblings, 2 replies; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-11-14 14:00 UTC (permalink / raw)
  To: 67174

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]


Hi,

Here is a patch to have a SVG version of the Gnus mode-line logo.  I
have used "etc/images/gnus/gnus.svg" as a base, removed the shadow and
just kept the head of the Gnu.

I have chosen to remove the stroke color so the foreground color of the
default face will be used to draw the icon.  I think it is better to
match any themes.

I have kept all the copyright information from gnus.svg but I think it
could also be minified a bit by stripping it.  WDYT?

Best regards,

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Gnus-mode-line-logo-in-SVG.patch --]
[-- Type: text/x-patch, Size: 6953 bytes --]

From 7ddf403b2ca30dbc45651214b6d93c360dccfbfe Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Tue, 14 Nov 2023 14:49:37 +0100
Subject: [PATCH] Gnus mode line logo in SVG

* etc/images/gnus/gnus-pointer.svg: SVG Gnus mode line logo.
* lisp/gnus/gnus.el (gnus-mode-line-buffer-identification): Use it.
---
 etc/images/gnus/gnus-pointer.svg | 94 ++++++++++++++++++++++++++++++++
 lisp/gnus/gnus.el                |  6 +-
 2 files changed, 98 insertions(+), 2 deletions(-)
 create mode 100644 etc/images/gnus/gnus-pointer.svg

diff --git a/etc/images/gnus/gnus-pointer.svg b/etc/images/gnus/gnus-pointer.svg
new file mode 100644
index 00000000000..67a631cdcf5
--- /dev/null
+++ b/etc/images/gnus/gnus-pointer.svg
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Gnu Emacs Logo
+
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
+
+   Author: Francesc Rocher <f.rocher@member.fsf.org>
+
+   This file is part of GNU Emacs.
+
+   GNU Emacs is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   GNU Emacs is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+-->
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   width="23.6206187542"
+   height="16"
+   version="1.0"
+   style="display:inline"
+   id="svg1"
+   sodipodi:docname="gnus-pointer.svg"
+   inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
+   viewBox="0 0 167.68044 113.58242"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/">
+  <defs
+     id="defs1" />
+  <sodipodi:namedview
+     id="namedview1"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:zoom="2.7948886"
+     inkscape:cx="128.09097"
+     inkscape:cy="123.26073"
+     inkscape:current-layer="layer1" />
+  <metadata
+     id="metadata2166">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <cc:license
+           rdf:resource="https://www.gnu.org/copyleft/gpl.html" />
+        <dc:title>gnus</dc:title>
+        <dc:date>2008/06/28</dc:date>
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Francesc Rocher</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <dc:rights>
+          <cc:Agent>
+            <dc:title>GPL</dc:title>
+          </cc:Agent>
+        </dc:rights>
+        <dc:description>gnus icon image</dc:description>
+        <cc:license
+           rdf:resource="https://www.gnu.org/copyleft/gpl.html" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-214.53867,-140.13329)">
+    <path
+       style="fill-opacity:1"
+       d="m 321.70896,253.17911 c -0.36667,-0.36666 -0.67201,-5.20416 -0.67854,-10.75 -0.019,-16.11278 -3.80254,-26.01429 -11.53101,-30.17635 -1.90142,-1.02398 -3.45712,-2.07087 -3.45712,-2.32642 0,-1.43357 10.45296,-16.08056 11.47604,-16.08056 2.47319,0 9.23725,5.87604 10.97182,9.53138 5.03752,10.61578 4.34103,30.55989 -1.50929,43.21862 -3.28874,7.11606 -3.93373,7.9215 -5.2719,6.58333 z m -77.16152,-8.46295 c -4.45468,-3.91126 -4.44465,-5.90837 0.0814,-16.20837 6.498,-14.78751 34.5082,-54.96722 36.7536,-52.72182 1.31908,1.31908 -1.58012,6.7064 -6.9201,12.85902 -5.10867,5.88611 -15.27729,21.00949 -18.79544,27.95371 -3.51862,6.94514 -2.86216,9.83677 2.56492,11.29813 2.18779,0.58911 5.33413,0.77321 6.99187,0.4091 6.2872,-1.3809 18.78154,-10.37638 34.82869,-25.07544 1.63528,-1.49791 2.98143,-2.00796 3.86245,-1.46346 2.11637,1.30799 -7.3484,14.40921 -15.90222,22.01199 -16.20847,14.40636 -27.60611,21.67016 -36.7152,23.39889 -2.68566,0.50969 -3.8489,0.0855 -6.75,-2.46175 z m 106.49485,-47.00332 c -2.5122,-0.71522 -8.01566,-5.45017 -19.5,-16.77699 -12.82987,-12.6539 -16.81552,-16.00934 -20.11602,-16.9353 -9.0949,-2.5516 -16.05869,-0.67634 -18.98403,5.11216 -1.7056,3.37495 -5.29744,7.73307 -6.37338,7.73307 -0.34364,0 -1.1778,-1.5293 -1.8537,-3.39846 -1.42445,-3.93926 -8.55314,-10.8615 -13.72556,-13.32805 -3.4655,-1.65258 -3.70255,-1.63465 -7.9122,0.59856 -2.38681,1.26621 -5.39614,3.78466 -6.68739,5.59656 -2.99038,4.19616 -18.42665,18.22292 -22.26047,20.22784 -3.6871,1.92819 -10.16611,1.16914 -12.83946,-1.5042 -1.25983,-1.25984 -2.63141,-5.30077 -3.84411,-11.32548 -1.03697,-5.15172 -2.08806,-10.26677 -2.33574,-11.36677 -0.24769,-1.1 0.16855,-2.83295 0.92497,-3.85101 1.33079,-1.79111 1.50083,-1.78047 5.25386,0.32885 2.13321,1.19893 4.96021,3.93001 6.28222,6.06908 2.91698,4.71978 6.42385,5.78889 11.14802,3.3986 5.61805,-2.84256 13.87615,-9.63484 17.51425,-14.40546 5.80084,-7.60662 11.27676,-12.99393 13.86896,-13.64453 1.35462,-0.33999 4.82023,0.14973 7.70136,1.08827 4.00736,1.3054 6.38479,2.98928 10.11649,7.16527 l 4.87808,5.45885 1.83587,-3.01884 c 2.46937,-4.06056 10.61011,-8.08908 16.34622,-8.08908 7.64657,0 14.07091,3.70799 23.59667,13.61949 4.6942,4.88428 9.67621,10.28189 11.07114,11.99468 9.1173,11.19486 23.8278,13.70046 29.6705,5.0537 1.25211,-1.85302 3.42939,-4.44884 4.83841,-5.7685 l 2.56185,-2.39937 -0.72231,3.87057 c -1.32367,7.09295 -6.50404,19.06241 -9.26864,21.41558 -8.2221,6.99849 -14.31844,9.03606 -21.18586,7.08091 z"
+       id="path1" />
+  </g>
+</svg>
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index fc8518512ee..ffe81e5c585 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -325,8 +325,10 @@ gnus-mode-line-buffer-identification
 	 0 5
 	 (list 'display
 	       (find-image
-		'((:type xpm :file "gnus-pointer.xpm"
-			 :ascent center)
+		'((:type svg :file "gnus-pointer.svg"
+                         :ascent center)
+                  (:type xpm :file "gnus-pointer.xpm"
+			    :ascent center)
 		  (:type xbm :file "gnus-pointer.xbm"
 			 :ascent center))
 		t)
-- 
2.42.0


[-- Attachment #3: Type: text/plain, Size: 7372 bytes --]



In GNU Emacs 30.0.50 (build 2, x86_64-unknown-openbsd7.4) of 2023-11-14
 built on computer
Repository revision: 183d2c3e5463d33af05e5ea8ea546bd348da0d10
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: OpenBSD computer 7.4 GENERIC.MP#0 amd64

Configured using:
 'configure CC=egcc MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
 --exec-prefix=/home/manuel --with-x-toolkit=no --without-cairo
 --without-dbus --without-gconf --without-gsettings --without-sound
 --without-compress-install'

Configured features:
FREETYPE GIF GLIB GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBXML2 MODULES
NOTIFY KQUEUE OLDXMENU PDUMPER PNG RSVG SQLITE3 THREADS TIFF TREE_SITTER
WEBP X11 XDBE XFT XIM XINPUT2 XPM ZLIB

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: VC dir

Minor modes in effect:
  vc-dir-git-mode: t
  display-time-mode: t
  display-battery-mode: t
  server-mode: t
  override-global-mode: t
  repeat-mode: t
  savehist-mode: t
  desktop-save-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/manuel/.emacs.d/elpa/ef-themes-1.4.0/theme-loaddefs hides /home/manuel/emacs/share/emacs/30.0.50/lisp/theme-loaddefs

Features:
(shadow sort gnus-cite mail-extr emacsbug log-edit add-log smerge-mode
diff whitespace vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view
pcvs-util calc-yank misearch multi-isearch descr-text tabify misc
cus-edit cus-start cl-print help-fns radix-tree pulse calc-misc calc-alg
calc-menu gnus-topic mm-archive url-cache qp utf-7 imap rfc2104 nndoc
nndraft nnmh network-stream nnfolder nnml gnus-agent gnus-srvr
gnus-score score-mode nnvirtual nntp gnus-cache nnrss org-agenda imenu
org-indent org-element org-persist org-id avl-tree oc-basic ol-eww
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect ol-docview doc-view
ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi gnus-icalendar
org-capture org-refile org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-src ob-comint org-pcomplete org-list org-footnote
org-faces org-entities ob-emacs-lisp ob-core ob-eval org-cycle org-table
ol org-fold org-fold-core org-keys oc org-loaddefs org-version
org-compat org-macs autorevert filenotify image-mode exif eww url-queue
mm-url warnings rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap sgml-mode facemenu nxml-util nxml-enc
xmltok conf-mode vc-hg mule-util jka-compr on-screen vc-dir ewoc vc
sh-script smie treesit executable pascal vc-git diff-mode vc-dispatcher
bug-reference paredit gnus-dired time battery cus-load exwm-randr
xcb-randr exwm-config ido exwm exwm-input xcb-keysyms xcb-xkb
exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types
xcb-debug server ef-summer-theme ef-themes modus-operandi-theme
modus-themes zone speed-type url-http url-auth url-gw nsm compat ytdious
mingus libmpdee reporter edebug debug backtrace transmission color
calc-bin calc-ext calc calc-loaddefs rect calc-macs supercite regi
ebdb-message ebdb-gnus gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom
gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail
mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail
yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
gmm-utils mailheader gnus-win ebdb-mua ebdb-com crm ebdb-format ebdb
mailabbrev eieio-opt speedbar ezimage dframe find-func eieio-base pcase
timezone icalendar gnus nnheader gnus-util mail-utils range mm-util
mail-prsvr wid-edit visual-basic-mode cl web-mode derived disp-table
erlang-start smart-tabs-mode skeleton cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs slime-asdf grep
slime-tramp tramp rx trampver tramp-integration files-x tramp-message
tramp-compat xdg shell pcomplete parse-time iso8601 time-date
format-spec tramp-loaddefs slime-fancy slime-indentation slime-cl-indent
cl-indent slime-trace-dialog slime-fontifying-fu slime-package-fu
slime-references slime-compiler-notes-tree advice slime-scratch
slime-presentations bridge slime-macrostep macrostep slime-mdot-fu
slime-enclosing-context slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
slime-repl slime-parse slime apropos compile text-property-search etags
fileloop generator xref project arc-mode archive-mode noutline outline
icons pp comint ansi-osc ansi-color ring hyperspec thingatpt
slime-autoloads edmacro kmacro use-package-bind-key bind-key appt
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs dired-x
dired-aux dired dired-loaddefs notifications dbus xml cl-extra help-mode
use-package-core repeat easy-mmode savehist desktop frameset
debbugs-autoloads ebdb-autoloads ef-themes-autoloads exwm-autoloads
hyperbole-autoloads magit-autoloads git-commit-autoloads finder-inf
magit-section-autoloads dash-autoloads on-screen-autoloads osm-autoloads
paredit-autoloads rust-mode-autoloads speed-type-autoloads
transmission-autoloads with-editor-autoloads info compat-autoloads
ytdious-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads kqueue
lcms2 dynamic-setting font-render-setting xinput2 x multi-tty
move-toolbar make-network-process emacs)

Memory information:
((conses 16 780079 227353) (symbols 48 70879 4)
 (strings 32 251023 7114) (string-bytes 1 9123344) (vectors 16 114900)
 (vector-slots 8 2710188 201834) (floats 8 568 593)
 (intervals 56 14865 1031) (buffers 992 124))

-- 
Manuel Giraud

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-14 14:00 bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo? Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-11-15  9:59 ` Eric Abrahamsen
  2023-11-15 12:19   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-26  7:25 ` Visuwesh
  1 sibling, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2023-11-15  9:59 UTC (permalink / raw)
  To: 67174; +Cc: manuel

Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> Hi,
>
> Here is a patch to have a SVG version of the Gnus mode-line logo.  I
> have used "etc/images/gnus/gnus.svg" as a base, removed the shadow and
> just kept the head of the Gnu.
>
> I have chosen to remove the stroke color so the foreground color of the
> default face will be used to draw the icon.  I think it is better to
> match any themes.
>
> I have kept all the copyright information from gnus.svg but I think it
> could also be minified a bit by stripping it.  WDYT?

Looks good to me, thank you! For my amusement I rebuilt Emacs without
SVG support and it correctly fell back to the xpm file.

I think it's fine to leave the copyright information etc just as it is
in gnus.svg. Maybe let's give it a day in case a maintainer wants to
chime in, but I'd expect it's fine as-is.

Thanks,
Eric





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-15  9:59 ` Eric Abrahamsen
@ 2023-11-15 12:19   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-19 20:10     ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-11-15 12:19 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 67174

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

[...]

> Looks good to me, thank you! For my amusement I rebuilt Emacs without
> SVG support and it correctly fell back to the xpm file.
>
> I think it's fine to leave the copyright information etc just as it is
> in gnus.svg. Maybe let's give it a day in case a maintainer wants to
> chime in, but I'd expect it's fine as-is.

Hi Eric and thanks for the kind words,

The thing I am not really sure about is the scaling.  Like it is done
for the xpm, this image is set to ":scale 1" but as it is a SVG it might
make sense to scale it to the mode-line's char-height.  I don't know how
to do that though.
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-15 12:19   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-11-19 20:10     ` Eric Abrahamsen
  2023-11-20  9:23       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2023-11-19 20:10 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 67174

Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> [...]
>
>> Looks good to me, thank you! For my amusement I rebuilt Emacs without
>> SVG support and it correctly fell back to the xpm file.
>>
>> I think it's fine to leave the copyright information etc just as it is
>> in gnus.svg. Maybe let's give it a day in case a maintainer wants to
>> chime in, but I'd expect it's fine as-is.
>
> Hi Eric and thanks for the kind words,
>
> The thing I am not really sure about is the scaling.  Like it is done
> for the xpm, this image is set to ":scale 1" but as it is a SVG it might
> make sense to scale it to the mode-line's char-height.  I don't know how
> to do that though.

Hmm, I couldn't find an explicit statement of this in the manual, but it
looks to me that, since we're using the 'display text property, the
:scale property will already be relative to the text that _would have
been displayed there_. IOW, we're already scaled to the text. The text
property is applied to the "^Gnus:" part of a string, so 5 characters,
and that's our base.

Anyway, if you're concerned that the icon might bulge out the mode line
or something, I don't think that will happen.

Eric





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-19 20:10     ` Eric Abrahamsen
@ 2023-11-20  9:23       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-20 18:01         ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-11-20  9:23 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 67174

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

[...]

> Hmm, I couldn't find an explicit statement of this in the manual, but it
> looks to me that, since we're using the 'display text property, the
> :scale property will already be relative to the text that _would have
> been displayed there_. IOW, we're already scaled to the text. The text
> property is applied to the "^Gnus:" part of a string, so 5 characters,
> and that's our base.

I don't know how it works for you but for me the pixmap version is
always the same size whatever the font size I'm using.

> Anyway, if you're concerned that the icon might bulge out the mode line
> or something, I don't think that will happen.

Yes, I have tested with really tiny font and the icon (pixmap or SVG)
never bulge.  So all in all, I think that this patch could go in as is.
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-20  9:23       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-11-20 18:01         ` Eric Abrahamsen
  2023-11-20 19:35           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2023-11-20 18:01 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 67174-done


On 11/20/23 10:23 AM, Manuel Giraud wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> [...]
>
>> Hmm, I couldn't find an explicit statement of this in the manual, but it
>> looks to me that, since we're using the 'display text property, the
>> :scale property will already be relative to the text that _would have
>> been displayed there_. IOW, we're already scaled to the text. The text
>> property is applied to the "^Gnus:" part of a string, so 5 characters,
>> and that's our base.
>
> I don't know how it works for you but for me the pixmap version is
> always the same size whatever the font size I'm using.

I suppose that makes sense! Given that it's a pixmap. But not an issue
for us.

>> Anyway, if you're concerned that the icon might bulge out the mode line
>> or something, I don't think that will happen.
>
> Yes, I have tested with really tiny font and the icon (pixmap or SVG)
> never bulge.  So all in all, I think that this patch could go in as is.

Done! Thanks for the patch.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-20 18:01         ` Eric Abrahamsen
@ 2023-11-20 19:35           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-11-20 19:35 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 67174-done

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

[...]

> Done! Thanks for the patch.

Thank you!
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-14 14:00 bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo? Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-15  9:59 ` Eric Abrahamsen
@ 2023-11-26  7:25 ` Visuwesh
  2023-11-27  9:01   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 17+ messages in thread
From: Visuwesh @ 2023-11-26  7:25 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 67174

[செவ்வாய் நவம்பர் 14, 2023] Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

[ Sorry for the late reply.  ]

> Hi,
>
> Here is a patch to have a SVG version of the Gnus mode-line logo.  I
> have used "etc/images/gnus/gnus.svg" as a base, removed the shadow and
> just kept the head of the Gnu.
>
> I have chosen to remove the stroke color so the foreground color of the
> default face will be used to draw the icon.  I think it is better to
> match any themes.
>
> I have kept all the copyright information from gnus.svg but I think it
> could also be minified a bit by stripping it.  WDYT?
>
> Best regards,

The logo looks really clean but unfortunately it is not the same blue
anymore.  Is this something we should care about?  Personally, I liked
the nice blue colour of the Gnus logo in the mode-line: a hint of colour
in the otherwise monochrome mode-line.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-26  7:25 ` Visuwesh
@ 2023-11-27  9:01   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-11-29  4:09     ` Visuwesh
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-11-27  9:01 UTC (permalink / raw)
  To: Visuwesh; +Cc: 67174

Visuwesh <visuweshm@gmail.com> writes:

[...]

> The logo looks really clean but unfortunately it is not the same blue
> anymore.  Is this something we should care about?  Personally, I liked
> the nice blue colour of the Gnus logo in the mode-line: a hint of colour
> in the otherwise monochrome mode-line.

Hi,

I think that this blue was working with light themes (BTW this is what I
use most of the time) but not so much with dark themes.  Hence, I did
not set the foreground color in the SVG for it to have the default
foreground color.

I think that if we should do something about it the best would be to
define a new face for it (or better, maybe use an already existing one…
but which one?)

Best regards,
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-27  9:01   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-11-29  4:09     ` Visuwesh
  2024-02-03 11:53       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Visuwesh @ 2023-11-29  4:09 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 67174

[திங்கள் நவம்பர் 27, 2023] Manuel Giraud wrote:

>> The logo looks really clean but unfortunately it is not the same blue
>> anymore.  Is this something we should care about?  Personally, I liked
>> the nice blue colour of the Gnus logo in the mode-line: a hint of colour
>> in the otherwise monochrome mode-line.
>
> Hi,
>
> I think that this blue was working with light themes (BTW this is what I
> use most of the time) but not so much with dark themes.  Hence, I did
> not set the foreground color in the SVG for it to have the default
> foreground color.

Ah, I see.  I have never used a dark theme myself so I didn't know.

> I think that if we should do something about it the best would be to
> define a new face for it (or better, maybe use an already existing one…
> but which one?)

That would be nice to have since I do like the little splash of colour.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2023-11-29  4:09     ` Visuwesh
@ 2024-02-03 11:53       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-02-08 14:08         ` Visuwesh
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-03 11:53 UTC (permalink / raw)
  To: Visuwesh; +Cc: 67174

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

Visuwesh <visuweshm@gmail.com> writes:

[...]

> That would be nice to have since I do like the little splash of
> colour.

Hi Visuwesh (and all),

What do you think of this attached patch?  Now that SVG are honoring the
colors of the face property, I just add a face property to the logo.

I have chosen 'font-lock-function-name-face' because it is a somewhat
standard face and it is of color Blue1 (#0000ff) with the default Emacs
theme (this is the same color of the XPM logo).

Using a face property also have the nice property (😁) of automatically
adapt to any other theme.
-- 
Manuel Giraud

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Colorize-SVG-Gnus-logo-in-mode-line.patch --]
[-- Type: text/x-patch, Size: 820 bytes --]

> From 6ba6a224c86f845a61f951c6b664b415a5914142 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Sat, 3 Feb 2024 12:15:21 +0100
Subject: [PATCH] Colorize SVG Gnus logo in mode line

* lisp/gnus/gnus.el (gnus-mode-line-buffer-identification):
Add a face property to colorized the SVG Gnus logo.
---
 lisp/gnus/gnus.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 99833e4eeca..9366624fe03 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -333,6 +333,7 @@ gnus-mode-line-buffer-identification
 		  (:type xbm :file "gnus-pointer.xbm"
 			 :ascent center))
 		t)
+               'face 'font-lock-function-name-face
 	       'help-echo (if gnus-emacs-version
                               (format
 			       "This is %s, %s."
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2024-02-03 11:53       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-08 14:08         ` Visuwesh
  2024-02-08 15:52           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Visuwesh @ 2024-02-08 14:08 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 67174

[சனி பிப்ரவரி 03, 2024] Manuel Giraud wrote:

Hello Manuel,

> Visuwesh <visuweshm@gmail.com> writes:
>
> [...]
>
>> That would be nice to have since I do like the little splash of
>> colour.
>
> Hi Visuwesh (and all),
>
> What do you think of this attached patch?  Now that SVG are honoring the
> colors of the face property, I just add a face property to the logo.
>
> I have chosen 'font-lock-function-name-face' because it is a somewhat
> standard face and it is of color Blue1 (#0000ff) with the default Emacs
> theme (this is the same color of the XPM logo).
>
> Using a face property also have the nice property (😁) of automatically
> adapt to any other theme.

I know that I asked about adding a splash of colour to the mode-line but
now that I have run the monochrome Gnus logo, I don't feel the need for
the splash of colour anymore.  But if general consensus is that we add a
new face for this, can we add a new face that inherits from
font-lock-function-name-face instead?  I, for one, set every face to
inherit from default and change some to use different fonts so I would
still end up with a monochrome logo if I decide to have it coloured.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2024-02-08 14:08         ` Visuwesh
@ 2024-02-08 15:52           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-02-08 21:42             ` Stefan Kangas
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-08 15:52 UTC (permalink / raw)
  To: Visuwesh; +Cc: 67174

Visuwesh <visuweshm@gmail.com> writes:

> [சனி பிப்ரவரி 03, 2024] Manuel Giraud wrote:
>
> Hello Manuel,
>
>> Visuwesh <visuweshm@gmail.com> writes:
>>
>> [...]
>>
>>> That would be nice to have since I do like the little splash of
>>> colour.
>>
>> Hi Visuwesh (and all),
>>
>> What do you think of this attached patch?  Now that SVG are honoring the
>> colors of the face property, I just add a face property to the logo.
>>
>> I have chosen 'font-lock-function-name-face' because it is a somewhat
>> standard face and it is of color Blue1 (#0000ff) with the default Emacs
>> theme (this is the same color of the XPM logo).
>>
>> Using a face property also have the nice property (😁) of automatically
>> adapt to any other theme.
>
> I know that I asked about adding a splash of colour to the mode-line but
> now that I have run the monochrome Gnus logo, I don't feel the need for
> the splash of colour anymore.  But if general consensus is that we add a
> new face for this, can we add a new face that inherits from
> font-lock-function-name-face instead?

Hi Visuwesh,

Yes, that would make much more sense indeed.  But like you now, I'm used
to the monochrome logo so if no one pushes for this change maybe it
could be abandoned.
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2024-02-08 15:52           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-08 21:42             ` Stefan Kangas
  2024-02-09  0:43               ` Visuwesh
  2024-02-09 10:14               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 17+ messages in thread
From: Stefan Kangas @ 2024-02-08 21:42 UTC (permalink / raw)
  To: Manuel Giraud, Visuwesh; +Cc: 67174

Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> Yes, that would make much more sense indeed.  But like you now, I'm used
> to the monochrome logo so if no one pushes for this change maybe it
> could be abandoned.

The vectorization still makes sense though, doesn't it?  What with HiDPI
screens these days and all.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2024-02-08 21:42             ` Stefan Kangas
@ 2024-02-09  0:43               ` Visuwesh
  2024-02-09 10:14               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 17+ messages in thread
From: Visuwesh @ 2024-02-09  0:43 UTC (permalink / raw)
  To: Stefan Kangas, Manuel Giraud; +Cc: 67174



On 9 February 2024 03:12:35 GMT+05:30, Stefan Kangas <stefankangas@gmail.com> wrote:
>Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of
>text editors" <bug-gnu-emacs@gnu.org> writes:
>
>> Yes, that would make much more sense indeed.  But like you now, I'm used
>> to the monochrome logo so if no one pushes for this change maybe it
>> could be abandoned.
>
>The vectorization still makes sense though, doesn't it?  What with HiDPI
>screens these days and all.

Yes, the svg was pushed to master months back so we already have the vectorised logo with us.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2024-02-08 21:42             ` Stefan Kangas
  2024-02-09  0:43               ` Visuwesh
@ 2024-02-09 10:14               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-02-10 11:19                 ` Stefan Kangas
  1 sibling, 1 reply; 17+ messages in thread
From: Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-02-09 10:14 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 67174, Visuwesh

Stefan Kangas <stefankangas@gmail.com> writes:

> Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@gnu.org> writes:
>
>> Yes, that would make much more sense indeed.  But like you now, I'm used
>> to the monochrome logo so if no one pushes for this change maybe it
>> could be abandoned.
>
> The vectorization still makes sense though, doesn't it?  What with HiDPI
> screens these days and all.

Yes, I was only talking about the "splash of colour" requested by
Visuwesh at the time (this bug report has drifted a bit :-)
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo?
  2024-02-09 10:14               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-02-10 11:19                 ` Stefan Kangas
  0 siblings, 0 replies; 17+ messages in thread
From: Stefan Kangas @ 2024-02-10 11:19 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 67174, Visuwesh

tags 67174 + fixed
thanks

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> The vectorization still makes sense though, doesn't it?  What with HiDPI
>> screens these days and all.
>
> Yes, I was only talking about the "splash of colour" requested by
> Visuwesh at the time (this bug report has drifted a bit :-)

OK, let's tag this as fixed.  If there are no further comments within
some time, I suppose we could close this.





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-02-10 11:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14 14:00 bug#67174: 30.0.50; [PATCH] What about a vectorized Gnus mode-line logo? Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-15  9:59 ` Eric Abrahamsen
2023-11-15 12:19   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-19 20:10     ` Eric Abrahamsen
2023-11-20  9:23       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-20 18:01         ` Eric Abrahamsen
2023-11-20 19:35           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-26  7:25 ` Visuwesh
2023-11-27  9:01   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-29  4:09     ` Visuwesh
2024-02-03 11:53       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-08 14:08         ` Visuwesh
2024-02-08 15:52           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-08 21:42             ` Stefan Kangas
2024-02-09  0:43               ` Visuwesh
2024-02-09 10:14               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-10 11:19                 ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).