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, 100x110 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. --- In this version 2, of id:20211101225336.29070-1-tomi.ollila@iki.fi. Dropped dimensions from 200x220 to 100x110; scaling in emacs is nontrivial; imagemagick can do it but then it renders background white which looks bad when using "dark" mode. (press '+' and '-' on top of the image and see background going white (in this case it also scales the pixel image, does not re-render svg). Spent a bit of time with svg.el -- then noticed it does not support translate, rotate nor scale. In order to use that I would have to calculate the final pixels (and if we desired scaling, then dynamically counting dimensions and pixel endpoints...) If scaling does not improve in (future) emaces, one option could be to parse the xml, change image dimensions, add scale (and background rectangle) nodes, then write xml to string and load that image (whether that works or not, I don't know -- or if that is good idea) 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..6fdeb71d --- /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" + height="110" width="100" fill="#000" stroke-width="1"> + <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 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" /> + <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 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)" /> + <g fill="none" stroke="#000"> + <path d="M9 52 l13 -42 l13 42" /> + <path d="M91 73 l-13 -42 l-13 42" /> + </g> +</svg> -- 2.25.1
[-- Attachment #1: Type: text/plain, Size: 796 bytes --] Tomi Ollila <tomi.ollila@iki.fi> writes: > 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, 100x110 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. I wish it was possible to scale in units relative to text size. For me with default settings it looks a bit big (see attached). Anyway, I can live with this (not least since I don't normally display the logo). Anyone else want to chime in before I apply this change? [-- Attachment #2: 2021-12-16-123923_1276x1401_scrot.png --] [-- Type: image/png, Size: 66142 bytes --] [-- Attachment #3: Type: text/plain, Size: 0 bytes --]
On Thu, Dec 16 2021, David Bremner wrote: > Tomi Ollila <tomi.ollila@iki.fi> writes: > >> 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, 100x110 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. > > I wish it was possible to scale in units relative to text size. For me > with default settings it looks a bit big (see attached). Anyway, I can > live with this (not least since I don't normally display the logo). Nice font, is that 20 pixels in height ? (and what font is it ?) > Anyone else want to chime in before I apply this change? I personally tried with 12x25 sized font (xrandr tells 1920x1200, 294mm x 165mm so what is that in dpi...) -- and it could be that majority of users uses smaller font so it could look a bit tall. Let's wait for a while for more comments. In the meanwhile, after sending the patch email, I noticed that the .png is 50x58 in size and .svg 110x100 (I accidentally swapped dimensions). So now I tried to drop 10 pixels from bottom (making it 100x100) which makes it look a bit more like the original. The modified image is available below; the html "decoration" is for your entertainment: copy the whole content into a file.html, open file://$PWD/file.html in your web browser -- if web browser is firefox, ctrl-+ and ctrl-- scales the image... Tomi --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- <!DOCTYPE html> <html> <head> <style type="text/css"> body { background-color: #777; } </style> </head> <body> <?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" height="100" width="100" fill="#000" stroke-width="1"> <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 90 A5 5 0 0 1 40 95 L20 95 A5 5 0 0 0 15 100 L85 100 A5 5 0 0 0 80 95 L60 95 A5 5 0 0 1 55 90 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 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)" /> <g fill="none" stroke="#000"> <path d="M9 52 l13 -42 l13 42" /> <path d="M91 73 l-13 -42 l-13 42" /> </g> </svg> </body> </html> --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
Tomi Ollila <tomi.ollila@iki.fi> writes: > > Nice font, is that 20 pixels in height ? (and what font is it ?) I use "DejaVu Sans Mono-normal-normal-normal-*-17-*-*-*-m-0-iso10646-1", but I'm not sure what that is in pixels. Some random web types claim that it is more like 23px @ 96 dpi. > >> Anyone else want to chime in before I apply this change? > > I personally tried with 12x25 sized font (xrandr tells 1920x1200, > 294mm x 165mm so what is that in dpi...) -- and it could be that > majority of users uses smaller font so it could look a bit tall. > > Let's wait for a while for more comments. > Agreed, it's not too urgent. Although apparently the cool kids are annoyed the old logo does not work with their themes. d
[-- Attachment #1.1: Type: text/plain, Size: 1271 bytes --] Hello David, Looks good to me. The old logo always felt a bit small to me anyway. 🧐😜 Cheers, --alex -- www.condition-alpha.com / @c_alpha Sent from my iPhone; apologies for brevity and autocorrect weirdness. > On 21. Dec 2021, at 12:05, David Bremner <david@tethera.net> wrote: > > Tomi Ollila <tomi.ollila@iki.fi> writes: >> >> Nice font, is that 20 pixels in height ? (and what font is it ?) > > I use "DejaVu Sans Mono-normal-normal-normal-*-17-*-*-*-m-0-iso10646-1", > but I'm not sure what that is in pixels. Some random web types claim > that it is more like 23px @ 96 dpi. > >> >>> Anyone else want to chime in before I apply this change? >> >> I personally tried with 12x25 sized font (xrandr tells 1920x1200, >> 294mm x 165mm so what is that in dpi...) -- and it could be that >> majority of users uses smaller font so it could look a bit tall. >> >> Let's wait for a while for more comments. >> > > Agreed, it's not too urgent. Although apparently the cool kids are > annoyed the old logo does not work with their themes. > > d > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org [-- Attachment #1.2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 1944 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --]