From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0BifJ2gWuWH08gAAgWs5BA (envelope-from ) for ; Tue, 14 Dec 2021 23:10:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YIQ5I2gWuWGMQgAAB5/wlQ (envelope-from ) for ; Tue, 14 Dec 2021 22:10:48 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BFEF129DCE for ; Tue, 14 Dec 2021 23:10:47 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9EE3729787; Tue, 14 Dec 2021 17:10:43 -0500 (EST) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 8FFFE29786 for ; Tue, 14 Dec 2021 17:10:40 -0500 (EST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id CAAE61B0004B; Wed, 15 Dec 2021 00:10:37 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1639519838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0D96G5TVUnH7CV4Mu5ylp3U0aa9ZHPFaQ9uFl2m1khU=; b=BpvpL2WTQPmOSj2RT5DKTgT41RHnOMDABSovmQs75sQ4N5g4qz6/DT4a3yp4ZBEOuGAaU7 BYsmQ5QfumyNOsnQgFM+79kIhWHEslKQc8VE1GAhqjsBvjqGSnbaYsDvgKBr1wxYdAsTQa xhAd5gYCsnxfkWX/q6gI6jzL2JoFtgJdjTkBjY4OCTh5TGGyIdrBGqWijbnigL11QJ/2Ut g8bxyeGhn3i97qX3PCLEjpsnljDqC5UrgzIdkPcBm3gvduSIEOrbTcIcaefF7fKOPuGgtB /GOD5L+8fWy8NdecpCkPbFBjSSmKmGou1awJ7EAPATAGS9Ol63zacgtPTUWMpQ== From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH v2] emacs: add notmuch-logo.svg and use it in emacs mua on graphic displays Date: Wed, 15 Dec 2021 00:10:34 +0200 Message-Id: <20211214221034.20032-1-tomi.ollila@iki.fi> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1639519838; a=rsa-sha256; cv=none; b=oStvgaQgSAzT8GA+c/dAdsNg8L/EFO6L2tepeGJzPxokVuK8xMUvQIMW3uhrv6K+20i2/7 LmdoiXnH85pVIk1tqCbR+lI98VOPprpa87qWja+kP7OWpTUA/62tVzq7yyBnk+M9qGCLg8 eFc+lpN4pCyUN9Jsv+mbTBLHiLcs6QKKjVhPxjhrrZLzBUk0ngXMSkg23O/V2sIeXU6Etg /oT3tw2rHZaL9t/LNqVl7omsX73/c3ohPWEhkVApp5/XMACtAOCqV09nh6o6pk/D/jKV+N fofeuN7XbaxoDAptWr0A++7axoJPIPl9FfpmgGvz2VXv33rU3MHdzO9QvAlrDQ== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1639519838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0D96G5TVUnH7CV4Mu5ylp3U0aa9ZHPFaQ9uFl2m1khU=; b=pgxrybM2yqniyiuyOTQdUd+CM4aI8y9nnLIgx3gUS4u+0alRIi1U9sHaGRKpJ8bj9JJLxK 6YLp8sNeKQg8lCbJ/QWRllJGQYO7jE2fSvOFa/tI2kbQu2oRTUAGbeFWkYmuxKBHRNyK6N +L0IXZHN1hJEi0mcJxes+fZLYXU5AMn3deqHhCTuM7usvVuK6hcDnWnYw9Z1s0tsx4AIXi H2P4ZEq8xgRXbcRnwKtMftED5R9w7kbK1swIoS9vfonqn14fFqjbnOtqh9vBFxOrhV4uPv 5xgewpvDy6HxmJpbY3tulE322RBU/kNJGISwS267WiFNHOdcqdRqwtaAY7AjJQ== Message-ID-Hash: LYWDCHVDMTYU2OR57HKI56NKJUVQ64XB X-Message-ID-Hash: LYWDCHVDMTYU2OR57HKI56NKJUVQ64XB X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: FR ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639519848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=4tFp4W6HMduXWbUIc+Gi+GR9j1j9DBQRQqOW2sg93qw=; b=SvOTT2Nw5pC8RvxSqPBwsLDam/dVBipYEdXmhdqPxR4/GkvcoZELZ33ADtzrL2JMRHr00v /AL5ZuQK9pda8dWtDv700db2n/G6PDR5XoyXgVrOiX32EAGbjd18g1wqnZAvn4lSPuWurC 6pqR41n9M7jMkk71iOCcShNBpXq4zRf/UorR7o0+OTKwl/N8FEQj7iVRQKhsymvA17vGHP bkXiU/Kon9K9qsDzg5xq+i1W8HsGJ6zV7Zc+J8MXT+sxrcHxWDPap9ammFsNxgU1Si0dtr Syu8GHKpcZ13J0Tz4ur8CpLdPo+/FQV1S6cmpXLrM2pDNClJNO9OMdFgC4fEFA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1639519848; a=rsa-sha256; cv=fail; b=Quh/r86ze97fvRGcMCPYtKKhWEDFjluC2QmoNBjG+nGaZ4oGYnUxKJgQiXE3uqb+m0C179 wiGKL9SRwuf2OqUn5oX0HsVMDptlaA98ZfBp5zoI6MrWD/m9LM0AP2mymDLGANkbCcT/ZT 3yOyI9SbK/MlaA2MfIvy8xuAACCOeUjm2ZL5Cpn71DcpSOWrJ4Py50b+mH4vGDdmm+t5do 6JtmO9XnPiHyLtWO6L6d9A9u7dtL4SwuPK+URyJydm/MRVwdjHGIy9DmCf8Gx2k4V0A/Yc /xLEaeXgVQCwxtdtorpSYnB6FwSLO7u/Si0txbtCto+k6hYlWnLTKphKyiVRcA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=BpvpL2WT; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 1.52 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=BpvpL2WT; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: BFEF129DCE X-Spam-Score: 1.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4aTFecKdsc1W 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 @@ + + + + + + + + + + + + + + + + + + + + + + -- 2.25.1