From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Subject: [PATCH v3] emacs: add notmuch-logo.svg and use it in emacs mua on graphic displays
Date: Wed, 22 Dec 2021 01:10:39 +0200 [thread overview]
Message-ID: <20211221231039.22785-1-tomi.ollila@iki.fi> (raw)
emacs/notmuch-logo.svg is handcrafted scalable vector graphics version
of the notmuch logo.
Emacs on graphic displays render this image four times in size compared
to the emacs/notmuch-logo.png, and the image is much sharper.
The rendered image size, 100x100 pixels, fits reasonably well with
text shown in various font sizes.
Scaling the image -- if desired -- may come in the future. For now
this is improvement on how the logo looked in notmuch-hello window.
---
Version 3 of id:m2o85gtd3y.fsf@guru.guru-group.fi
diffdiff: 100x100, viewbox, stroke-width=2, some adjustments
(viewbow was to support scaling -- unfortunately emacs 26
(librsvg) svg rendering did not scale -- it clipped
(imagemagick would have scaled -- but white backround)
;-Subject: [PATCH v2] emacs: add notmuch-logo.svg and use it in emacs
;+Subject: [PATCH v3] emacs: add notmuch-logo.svg and use it in emacs
; mua on graphic displays
;@@ -12,3 +12,3 @@
;
;-The rendered image size, 100x110 pixels, fits reasonably well with
;+The rendered image size, 100x100 pixels, fits reasonably well with
; text shown in various font sizes.
;
;@@ -87,4 +73,4 @@
; +<?xml version="1.0" encoding="UTF-8"?>
;-+<svg xmlns="http://www.w3.org/2000/svg"
;-+ height="110" width="100" fill="#000" stroke-width="1">
;++<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"
;++ viewbox="0 0 100 100" fill="#000" stroke-width="2">
; + <circle cx="50" cy="5" r="5" />
;@@ -95,7 +81,7 @@
; + </g>
;-+ <path d="M49 4 L45 100
;-+ A5 5 0 0 1 40 105 L20 105 A5 5 0 0 0 15 110
;-+ L85 110
;-+ A5 5 0 0 0 80 105 L60 105 A5 5 0 0 1 55 100
;-+ L55 100 L51 4 Z" />
;++ <path d="M49 4 L45 88
;++ A5 5 0 0 1 40 93 L20 93 A5 5 0 0 0 15 100
;++ L85 100
;++ A5 5 0 0 0 80 93 L60 93 A5 5 0 0 1 55 88
;++ L55 90 L51 4 Z" />
; + <g fill="#fff" stroke="#000">
;@@ -106,7 +92,7 @@
; + </g>
;-+ <path d="M-18 0 A25 20 0 0 0 18 0" transform="translate(22 51)" />
;-+ <path d="M-18 0 A25 20 0 0 0 18 0" transform="translate(78 72)" />
;++ <path d="M-18 0 A24 20 0 0 0 18 0" transform="translate(22 51.0)" />
;++ <path d="M-18 0 A24 20 0 0 0 18 0" transform="translate(78 71.5)" />
; + <g fill="none" stroke="#000">
;-+ <path d="M9 52 l13 -42 l13 42" />
;-+ <path d="M91 73 l-13 -42 l-13 42" />
;++ <path d="M9 53.0 l 12 -42 l 2 0 l 12 42" />
;++ <path d="M91 73.5 l-12 -42 l-2 0 l-12 42" />
; + </g>
debian/elpa-notmuch.elpa | 2 +-
emacs/Makefile.local | 2 +-
emacs/notmuch-hello.el | 2 +-
emacs/notmuch-logo.svg | 27 +++++++++++++++++++++++++++
4 files changed, 30 insertions(+), 3 deletions(-)
create mode 100644 emacs/notmuch-logo.svg
diff --git a/debian/elpa-notmuch.elpa b/debian/elpa-notmuch.elpa
index 4712b73f..7b3ce0fa 100644
--- a/debian/elpa-notmuch.elpa
+++ b/debian/elpa-notmuch.elpa
@@ -1,3 +1,3 @@
debian/tmp/usr/share/emacs/site-lisp/*.el
-debian/tmp/usr/share/emacs/site-lisp/notmuch-logo.png
+debian/tmp/usr/share/emacs/site-lisp/notmuch-logo.svg
emacs/notmuch-pkg.el
diff --git a/emacs/Makefile.local b/emacs/Makefile.local
index d1b320c3..0f1f0eb2 100644
--- a/emacs/Makefile.local
+++ b/emacs/Makefile.local
@@ -42,7 +42,7 @@ emacs_mua := $(dir)/notmuch-emacs-mua
emacs_mua_desktop := $(dir)/notmuch-emacs-mua.desktop
emacs_images := \
- $(srcdir)/$(dir)/notmuch-logo.png
+ $(srcdir)/$(dir)/notmuch-logo.svg
emacs_bytecode = $(emacs_sources:.el=.elc)
emacs_docstrings = $(emacs_sources:.el=.rsti)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index acd48c9b..fc007c4c 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -198,7 +198,7 @@ (defcustom notmuch-saved-search-sort-function nil
(defvar notmuch-hello-indent 4
"How much to indent non-headers.")
-(defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))
+(defimage notmuch-hello-logo ((:type svg :file "notmuch-logo.svg")))
(defcustom notmuch-show-logo t
"Should the notmuch logo be shown?"
diff --git a/emacs/notmuch-logo.svg b/emacs/notmuch-logo.svg
new file mode 100644
index 00000000..2c65a73b
--- /dev/null
+++ b/emacs/notmuch-logo.svg
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"
+ viewbox="0 0 100 100" fill="#000" stroke-width="2">
+ <circle cx="50" cy="5" r="5" />
+ <g transform="translate(50 20) rotate(20)">
+ <circle cx="-47" cy="0" r="3" />
+ <circle cx="47" cy="0" r="3" />
+ <path d="M-47 -1 L0 -3 L47 -1 L47 1 L0 3 L-47 1 Z" />
+ </g>
+ <path d="M49 4 L45 88
+ A5 5 0 0 1 40 93 L20 93 A5 5 0 0 0 15 100
+ L85 100
+ A5 5 0 0 0 80 93 L60 93 A5 5 0 0 1 55 88
+ L55 90 L51 4 Z" />
+ <g fill="#fff" stroke="#000">
+ <rect x="7" y="33" width="30" height="18" />
+ <line x1="7" y1="51" x2="18" y2="41" />
+ <line x1="37" y1="51" x2="26" y2="41" />
+ <polyline points="7 33 22 44 37 33" fill="none" />
+ </g>
+ <path d="M-18 0 A24 20 0 0 0 18 0" transform="translate(22 51.0)" />
+ <path d="M-18 0 A24 20 0 0 0 18 0" transform="translate(78 71.5)" />
+ <g fill="none" stroke="#000">
+ <path d="M9 53.0 l 12 -42 l 2 0 l 12 42" />
+ <path d="M91 73.5 l-12 -42 l-2 0 l-12 42" />
+ </g>
+</svg>
--
2.25.1
next reply other threads:[~2021-12-21 23:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 23:10 Tomi Ollila [this message]
2021-12-23 12:22 ` [PATCH v3] emacs: add notmuch-logo.svg and use it in emacs mua on graphic displays David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211221231039.22785-1-tomi.ollila@iki.fi \
--to=tomi.ollila@iki.fi \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.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).