patches and low-level development discussion
 help / color / mirror / code / Atom feed
* [PATCH v3] img/app: add dejavu_fonts pkg and fontconfig file
@ 2025-02-15 22:22 Samy Lahfa
  2025-02-20  0:32 ` Dom (shymega) Rodriguez
  2025-03-01  9:26 ` Alyssa Ross
  0 siblings, 2 replies; 3+ messages in thread
From: Samy Lahfa @ 2025-02-15 22:22 UTC (permalink / raw)
  To: devel; +Cc: shymega, Samy Lahfa

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

Spam detection software, running on the system "atuin.qyliss.net",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Signed-off-by: Samy Lahfa <samy+spectrum@lahfa.xyz> This fixes
   the foot terminal app-vm by adding dejavu_fonts package to the nix store
  as well as adding the fontconfig file, so it knows which default font to use.
   --- img/app/Makefile | 2 ++ img/app/de [...] 

Content analysis details:   (5.7 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
                            domain
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                            [URI: lahfa.xyz (xyz)]
 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 1.3 RDNS_NONE              Delivered to internal network by a host with no rDNS
-0.0 DMARC_PASS             DMARC pass policy



[-- Attachment #2: original message before SpamAssassin --]
[-- Type: message/rfc822, Size: 3342 bytes --]

From: Samy Lahfa <samy+spectrum@lahfa.xyz>
To: devel@spectrum-os.org
Cc: shymega@shymega.org.uk, Samy Lahfa <samy+spectrum@lahfa.xyz>
Subject: [PATCH v3] img/app: add dejavu_fonts pkg and fontconfig file
Date: Sat, 15 Feb 2025 23:22:51 +0100
Message-ID: <20250215222254.2950904-1-samy+spectrum@lahfa.xyz>

Signed-off-by: Samy Lahfa <samy+spectrum@lahfa.xyz>

This fixes the foot terminal app-vm by adding dejavu_fonts package to the
nix store as well as adding the fontconfig file, so it knows which
default font to use.
---
 img/app/Makefile             |  2 ++
 img/app/default.nix          |  3 ++-
 img/app/etc/fonts/fonts.conf | 21 +++++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 img/app/etc/fonts/fonts.conf

diff --git a/img/app/Makefile b/img/app/Makefile
index 7887aa8..eeb17fa 100644
--- a/img/app/Makefile
+++ b/img/app/Makefile
@@ -30,6 +30,7 @@ $(imgdir)/appvm/blk/root.img: ../../scripts/make-gpt.sh ../../scripts/sfdisk-fie
 
 VM_FILES = \
 	etc/dbus-1/session.conf \
+	etc/fonts/fonts.conf \
 	etc/fstab \
 	etc/init \
 	etc/mdev.conf \
@@ -52,6 +53,7 @@ VM_FILES = \
 	etc/s6-linux-init/scripts/rc.shutdown \
 	etc/s6-linux-init/scripts/rc.shutdown.final \
 	etc/xdg/xdg-desktop-portal/portals.conf
+
 VM_DIRS = dev run proc sys tmp \
 	etc/s6-linux-init/run-image/service
 VM_FIFOS = etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/fifo
diff --git a/img/app/default.nix b/img/app/default.nix
index 6537fb2..5b58a5f 100644
--- a/img/app/default.nix
+++ b/img/app/default.nix
@@ -8,7 +8,7 @@ pkgsStatic.callPackage (
 { lib, stdenvNoCC, runCommand, writeClosure
 , erofs-utils, jq, s6-rc, util-linux
 , busybox, cacert, execline, kmod, linux_latest, mdevd, s6, s6-linux-init
-, xdg-desktop-portal-spectrum
+, xdg-desktop-portal-spectrum, dejavu_fonts,
 }:
 
 let
@@ -37,6 +37,7 @@ let
       s6-rc
       terminfo
       xdg-desktop-portal-spectrum
+      dejavu_fonts
 
       # Some packages can't (currently?) be built statically.
 
diff --git a/img/app/etc/fonts/fonts.conf b/img/app/etc/fonts/fonts.conf
new file mode 100644
index 0000000..0dcde54
--- /dev/null
+++ b/img/app/etc/fonts/fonts.conf
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- SPDX-License-Identifier: CC0-1.0 -->
+<!-- SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is> -->
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
+<fontconfig>
+  <alias binding="same">
+    <family>monospace</family>
+    <prefer>
+      <family>DejaVu Sans Mono</family>
+    </prefer>
+  </alias>
+
+  <alias binding="same">
+    <family>sans-serif</family>
+    <prefer>
+      <family>DejaVu Sans</family>
+    </prefer>
+  </alias>
+
+  <dir>/usr/share/fonts</dir>
+</fontconfig>
-- 
2.47.2


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

* Re: [PATCH v3] img/app: add dejavu_fonts pkg and fontconfig file
  2025-02-15 22:22 [PATCH v3] img/app: add dejavu_fonts pkg and fontconfig file Samy Lahfa
@ 2025-02-20  0:32 ` Dom (shymega) Rodriguez
  2025-03-01  9:26 ` Alyssa Ross
  1 sibling, 0 replies; 3+ messages in thread
From: Dom (shymega) Rodriguez @ 2025-02-20  0:32 UTC (permalink / raw)
  To: Samy Lahfa; +Cc: devel

Hi Samy,

On 15.02.2025 23:22, Samy Lahfa wrote:
>Signed-off-by: Samy Lahfa <samy+spectrum@lahfa.xyz>
>
>This fixes the foot terminal app-vm by adding dejavu_fonts package to the
>nix store as well as adding the fontconfig file, so it knows which
>default font to use.
>---
> img/app/Makefile             |  2 ++
> img/app/default.nix          |  3 ++-
> img/app/etc/fonts/fonts.conf | 21 +++++++++++++++++++++
> 3 files changed, 25 insertions(+), 1 deletion(-)
> create mode 100644 img/app/etc/fonts/fonts.conf
>
>diff --git a/img/app/Makefile b/img/app/Makefile
>index 7887aa8..eeb17fa 100644
>--- a/img/app/Makefile
>+++ b/img/app/Makefile
>@@ -30,6 +30,7 @@ $(imgdir)/appvm/blk/root.img: ../../scripts/make-gpt.sh ../../scripts/sfdisk-fie
>
> VM_FILES = \
> 	etc/dbus-1/session.conf \
>+	etc/fonts/fonts.conf \
> 	etc/fstab \
> 	etc/init \
> 	etc/mdev.conf \
>@@ -52,6 +53,7 @@ VM_FILES = \
> 	etc/s6-linux-init/scripts/rc.shutdown \
> 	etc/s6-linux-init/scripts/rc.shutdown.final \
> 	etc/xdg/xdg-desktop-portal/portals.conf
>+
> VM_DIRS = dev run proc sys tmp \
> 	etc/s6-linux-init/run-image/service
> VM_FIFOS = etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/fifo
>diff --git a/img/app/default.nix b/img/app/default.nix
>index 6537fb2..5b58a5f 100644
>--- a/img/app/default.nix
>+++ b/img/app/default.nix
>@@ -8,7 +8,7 @@ pkgsStatic.callPackage (
> { lib, stdenvNoCC, runCommand, writeClosure
> , erofs-utils, jq, s6-rc, util-linux
> , busybox, cacert, execline, kmod, linux_latest, mdevd, s6, s6-linux-init
>-, xdg-desktop-portal-spectrum
>+, xdg-desktop-portal-spectrum, dejavu_fonts,
> }:
>
> let
>@@ -37,6 +37,7 @@ let
>       s6-rc
>       terminfo
>       xdg-desktop-portal-spectrum
>+      dejavu_fonts

The only thing remaining is to sort dejavu_fonts alphabetically, but
it's no biggie, and Alyssa I'm sure would be happy to fix this up in the
tree.

>
>       # Some packages can't (currently?) be built statically.
>
>diff --git a/img/app/etc/fonts/fonts.conf b/img/app/etc/fonts/fonts.conf
>new file mode 100644
>index 0000000..0dcde54
>--- /dev/null
>+++ b/img/app/etc/fonts/fonts.conf
>@@ -0,0 +1,21 @@
>+<?xml version="1.0" encoding="UTF-8"?>
>+<!-- SPDX-License-Identifier: CC0-1.0 -->
>+<!-- SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is> -->
>+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
>+<fontconfig>
>+  <alias binding="same">
>+    <family>monospace</family>
>+    <prefer>
>+      <family>DejaVu Sans Mono</family>
>+    </prefer>
>+  </alias>
>+
>+  <alias binding="same">
>+    <family>sans-serif</family>
>+    <prefer>
>+      <family>DejaVu Sans</family>
>+    </prefer>
>+  </alias>
>+
>+  <dir>/usr/share/fonts</dir>
>+</fontconfig>
>-- 
>2.47.2
>

LGTM - thank you for your patch!

Best wishes,
--
Dom Rodriguez

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

* Re: [PATCH v3] img/app: add dejavu_fonts pkg and fontconfig file
  2025-02-15 22:22 [PATCH v3] img/app: add dejavu_fonts pkg and fontconfig file Samy Lahfa
  2025-02-20  0:32 ` Dom (shymega) Rodriguez
@ 2025-03-01  9:26 ` Alyssa Ross
  1 sibling, 0 replies; 3+ messages in thread
From: Alyssa Ross @ 2025-03-01  9:26 UTC (permalink / raw)
  To: Samy Lahfa, devel; +Cc: shymega, Samy Lahfa

This patch has been committed as 6fa7be3ded14e9dae4605b064e8bea08286ba0c1,
which can be viewed online at
https://spectrum-os.org/git/spectrum/commit/?id=6fa7be3ded14e9dae4605b064e8bea08286ba0c1.

This is an automated message.  Send comments/questions/requests to:
Alyssa Ross <hi@alyssa.is>

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

end of thread, other threads:[~2025-03-01  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-15 22:22 [PATCH v3] img/app: add dejavu_fonts pkg and fontconfig file Samy Lahfa
2025-02-20  0:32 ` Dom (shymega) Rodriguez
2025-03-01  9:26 ` Alyssa Ross

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

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

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 NNTP newsgroup(s).