From unknown Sun Jun 22 04:29:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments. Resent-From: Andrew Patterson Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Thu, 13 Apr 2023 03:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62806@debbugs.gnu.org Cc: Andrew Patterson , ludo@gnu.org X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: ludo@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168135727913911 (code B ref -1); Thu, 13 Apr 2023 03:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Apr 2023 03:41:19 +0000 Received: from localhost ([127.0.0.1]:42245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmnpm-0003cI-8T for submit@debbugs.gnu.org; Wed, 12 Apr 2023 23:41:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:38136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmnpg-0003c4-LJ for submit@debbugs.gnu.org; Wed, 12 Apr 2023 23:41:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmnpf-0008I6-58 for guix-patches@gnu.org; Wed, 12 Apr 2023 23:41:11 -0400 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmnpb-0005fP-Nc for guix-patches@gnu.org; Wed, 12 Apr 2023 23:41:10 -0400 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-54c12009c30so365596027b3.9 for ; Wed, 12 Apr 2023 20:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681357264; x=1683949264; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mbPTcNq61I5k7DYWTQkKq7+Il/lnTaRizYBtqrv/ovg=; b=ZMZpWp93F/BFGFJhqYShdOTBdEew9MnSI/7oKJVP3PqqO/G+Ak5oAS4vVKdRfSuS5O qDa0rjMyFlZzS4urYUJswHL7vVaD7hoATecbDYCI55QlaBxbvCXwHpWOw/Y7OCMC4FV6 K2LhpMOp4L6L5GRLasXZXoEyHxFRQk0ZURX1EDpFmXOIzmqMD5SqIkZbeT2N7K0oavCR oG+7Pj/xben/6YllW3pUqyKkgsfLlGtzOao2MoKnkcOPak9I2hotJfy3uFd95Af+m2Gp Vi/tD2wNZHBtY9g9CXGiHMPVopBKuCV4LV690HQqDdrF7rxkOWYKpd7PMR3URqO9EWzk 7IuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681357264; x=1683949264; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mbPTcNq61I5k7DYWTQkKq7+Il/lnTaRizYBtqrv/ovg=; b=jHot0t9L5uXAyosqOeBGRworlTfEz0epxpaFn0PUB00hKruibPpu2+j4cRLFMm1d7z 9Vc1Q+f9Ey4vqQpfgwlL/Gab3rSYu2M3lRCX2zJjX3oqSTt73yO3dDLg31j0x9EBHpWF YQAIeKpClaQcFxi0lTRxt0RJ7zkhSRWaWUe87UXXLBDunHd06eWQFJioH5XB36sgAy/A fSLLkEzJhFJPsnrZdG5X9JPIWHfxyX0KjDwTkfWJ5T5VUlx8K9wn0dzHginOCesjpfFp wM7YsyevnzueoKqAs/YeKk0GiYDIi/iA199U81+15pBQJB5GsgSWOi/sTmRPfvpTY1DJ nJgg== X-Gm-Message-State: AAQBX9eFAzPwsvC7dohkgCiFMluAuPkKM9YBTI+pera13QmPV2nHEmKX I9MnCRkPSUeBcBCsgKGZTMGPTpRY08s= X-Google-Smtp-Source: AKy350aVwzEFnsZAJemNZy+Zcy6UwRhsnDigTFzGHb8W/up8rCXqEPDBBuYS/HPbJy/Lm3n1EOZiNA== X-Received: by 2002:a0d:ea4e:0:b0:541:8a02:c42b with SMTP id t75-20020a0dea4e000000b005418a02c42bmr673219ywe.28.1681357264149; Wed, 12 Apr 2023 20:41:04 -0700 (PDT) Received: from nostalgia-for-inf-0.lan ([204.111.132.134]) by smtp.gmail.com with ESMTPSA id d139-20020a814f91000000b0054f8de7c6f1sm181146ywb.70.2023.04.12.20.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 20:41:03 -0700 (PDT) From: Andrew Patterson Date: Wed, 12 Apr 2023 23:40:59 -0400 Message-Id: <20230413034059.5585-1-andrewpatt7@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1130; envelope-from=andrewpatt7@gmail.com; helo=mail-yw1-x1130.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) * gnu/home/services/fontutils.scm (add-fontconfig-config-file): Add support for adding arbitrary SXML configuration into fonts.conf; * doc/guix.texi (Fonts Services): Update the documentation. --- One of the main reasons I haven't started using guix home is that I use fonts.conf for setting default fonts, which guix home doesn't work with. This patch fixes that issue, by letting you add arbitrary XML to fonts.conf via SXML. doc/guix.texi | 16 +++++++++----- gnu/home/services/fontutils.scm | 38 ++++++++++++++++++++++++++------- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index acb6f0c2e1..f1cfdd77f4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -42968,8 +42968,10 @@ library is used by many applications to access fonts on the system. @defvar home-fontconfig-service-type This is the service type for generating configurations for Fontconfig. -Its associated value is a list of strings (or gexps) pointing to fonts -locations. +Its associated value is a list of either strings (or gexps) pointing to +fonts locations, or SXML (@pxref{SXML,,, guile, GNU Guile Reference +Manual}) fragments to be converted into XML and put inside the main +@code{fontconfig} node. Generally, it is better to extend this service than to directly configure it, as its default value is the default Guix Home's profile @@ -42977,13 +42979,17 @@ font installation path (@file{~/.guix-home/profile/share/fonts}). If you configure this service directly, be sure to include the above directory. -A typical extension for adding an additional font directory might look -like this: +A typical extension for adding an additional font directory and setting +a font as the default monospace font might look like this: @lisp (simple-service 'additional-fonts-service home-fontconfig-service-type - (list "~/.nix-profile/share/fonts")) + (list "~/.nix-profile/share/fonts" + '(alias + (family "monospace") + (prefer + (family "Liberation Mono"))))) @end lisp @end defvar diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.scm index 3399cb7ec8..0e60bc2035 100644 --- a/gnu/home/services/fontutils.scm +++ b/gnu/home/services/fontutils.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2021 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2023 Giacomo Leidi +;;; Copyright © 2023 Andrew Patterson ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,6 +24,8 @@ (define-module (gnu home services fontutils) #:use-module (gnu packages fontutils) #:use-module (guix gexp) #:use-module (srfi srfi-1) + #:use-module (ice-9 match) + #:use-module (sxml simple) #:export (home-fontconfig-service-type)) @@ -35,17 +38,36 @@ (define-module (gnu home services fontutils) ;;; ;;; Code: -(define (add-fontconfig-config-file directories) +(define (write-fontconfig-doctype) + "Prints fontconfig's DOCTYPE to current-output-port." + ;; This is necessary because SXML doesn't seem to have a way to represent a doctype, + ;; but sxml->xml /does/ currently call any thunks in the SXML with the XML output port + ;; as current-output-port, allowing the output to include arbitrary text instead of + ;; just properly quoted XML. + (format #t "")) + +(define (config->sxml config) + "Converts a record into the SXML representation +of fontconfig's fonts.conf file." + (define (snippets->sxml snippet) + (match snippet + ((or (? string? dir) + (? gexp? dir)) + `(dir ,dir)) + ((? list?) + snippet))) + `(*TOP* (*PI* xml "version='1.0'") + ,write-fontconfig-doctype + (fontconfig + ,@(map snippets->sxml config)))) + +(define (add-fontconfig-config-file config) `(("fontconfig/fonts.conf" ,(mixed-text-file "fonts.conf" - (apply string-append - `(" - -\n" ,@(map (lambda (directory) - (string-append " " directory "\n")) - directories) - "\n")))))) + (call-with-output-string + (lambda (port) + (sxml->xml (config->sxml config) port))))))) (define (regenerate-font-cache-gexp _) `(("profile/share/fonts" base-commit: 60c97c60a53686ec321eb541b85e01b6decc2014 -- 2.39.2 From unknown Sun Jun 22 04:29:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 24 Apr 2023 20:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Patterson Cc: conses , 62806@debbugs.gnu.org, Andrew Tropin Received: via spool by 62806-submit@debbugs.gnu.org id=B62806.16823688821929 (code B ref 62806); Mon, 24 Apr 2023 20:42:02 +0000 Received: (at 62806) by debbugs.gnu.org; 24 Apr 2023 20:41:22 +0000 Received: from localhost ([127.0.0.1]:50447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr2zx-0000V3-Rh for submit@debbugs.gnu.org; Mon, 24 Apr 2023 16:41:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr2zw-0000Ur-G8 for 62806@debbugs.gnu.org; Mon, 24 Apr 2023 16:41:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr2zp-0001KK-IE; Mon, 24 Apr 2023 16:41:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=dQUGroxuwaFJWv5uu7DNeWs7fNhW5lWO34Vz5DPi9l0=; b=LNS/z/OoqPEyO11WpBCc pZHtEJIpHouDBYrUfdQip4UUtvWq0n4kAHqi4NtwEHFroG2mhylIL30a34w+vPjGBOCoiQQKuE3sK 6z1nw5QCzlAW8cTMELLYizh1AbxWrjdSGcwVRI+06fxxIfg8mp2VBgCWv45hxNkKnT3NHkzhOulUS tVMWSE/kvQXsR758Dsn8w/qwI9us0fJgZez6jwB+xnazNjh2WJgjee0/7/VO8DDeJApB/FBi6qlo5 lUXmcO9zcVvkABkKJ+ZfmHGZ31kagiRPgYqUBD4cwSCnF3hnkQJqzpH6yabRBO7IUaCe1uO49kev/ u3+2Y6zfp1RQtQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr2zp-0002xP-5k; Mon, 24 Apr 2023 16:41:13 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230413034059.5585-1-andrewpatt7@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 =?UTF-8?Q?Flor=C3=A9al?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Rossignol X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 24 Apr 2023 22:41:10 +0200 In-Reply-To: <20230413034059.5585-1-andrewpatt7@gmail.com> (Andrew Patterson's message of "Wed, 12 Apr 2023 23:40:59 -0400") Message-ID: <87o7nd109l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Andrew Patterson skribis: > * gnu/home/services/fontutils.scm (add-fontconfig-config-file): Add > support for adding arbitrary SXML configuration into fonts.conf; > * doc/guix.texi (Fonts Services): Update the documentation. > --- > One of the main reasons I haven't started using guix home is that I use > fonts.conf for setting default fonts, which guix home doesn't work with. > This patch fixes that issue, by letting you add arbitrary XML to > fonts.conf via SXML.=20 Nice! You=E2=80=99re the third person looking into this, which shows there= =E2=80=99s a real need. :-) https://issues.guix.gnu.org/62145 https://issues.guix.gnu.org/57963 I like that your patch is simple (it doesn=E2=80=99t try to do anything bey= ond serializing SXML); perhaps there are ideas to borrow from the patch by Taiju HIGASHI? OTOH it=E2=80=99s less convenient to use for someone who=E2=80=99s not fami= liar with the XML schema of =E2=80=98fonts.conf=E2=80=99 than what the patch by conses do= es. I think we should really move forward on this. Because it=E2=80=99s not invasive, this patch sounds like the path of least resistance. What are your thoughts, people? What should we choose? :-) Ludo=E2=80=99. From unknown Sun Jun 22 04:29:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments. Resent-From: Andrew Patterson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 25 Apr 2023 00:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: conses , 62806@debbugs.gnu.org, Andrew Tropin Received: via spool by 62806-submit@debbugs.gnu.org id=B62806.168238334328297 (code B ref 62806); Tue, 25 Apr 2023 00:43:01 +0000 Received: (at 62806) by debbugs.gnu.org; 25 Apr 2023 00:42:23 +0000 Received: from localhost ([127.0.0.1]:50765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr6lC-0007ML-U7 for submit@debbugs.gnu.org; Mon, 24 Apr 2023 20:42:23 -0400 Received: from mail-yb1-f181.google.com ([209.85.219.181]:54313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr6lB-0007M9-RU for 62806@debbugs.gnu.org; Mon, 24 Apr 2023 20:42:22 -0400 Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-b996127ec71so3924762276.0 for <62806@debbugs.gnu.org>; Mon, 24 Apr 2023 17:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682383336; x=1684975336; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=mXKPE+raHrmwxOtPIDhIL0/CHXMPpCDvEkTMjsGaImw=; b=igFRUYWKbrmfl6rbubQvOweJhQBlDiYlhrb4sLWNlQgb3UT1EQZQTLlzEOYaz2mTra /A7fEoE7j6kxqHFwe+SVj/Der62XUGT3e3pQIQShC70SsZqVW/DfUJH1vdNJAJNBczd/ yHLYH42dPtFUv7o48RWulQ8PDbYX8hSa30PNMGyontKQTZsSEmHWgXzq0hEz0ewb58u2 AeMW0xYIpW1JAnYpfxPnUjADxO6+omoBio/W7kzXBf6QGLCHvlNESV7WL/QwUpOSDW0R ZpAw81Gi+yWKeCyBn9ZqaGuaqXjBBlMDeksJRWR4Jm+pRx3DomNnNE1d7UDeV1DSlrDA fj9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682383336; x=1684975336; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mXKPE+raHrmwxOtPIDhIL0/CHXMPpCDvEkTMjsGaImw=; b=lfLsUj0B55za2sfPZruG5UG84+3f832wIlg4XIeNhy+YSgYL8mCu5z52/9rj0SoqWQ ywHMvBkWuLdoYw2dDyB7HPEIaS4HmS2mcSQ8338XLxJ0FlZL/RbE8LKFZu+2qXzzrrSs I0boAopzyfazX7Gkc02Laxa0dOwjIg2eTnBuQTbbYHs8N0j1YNoJ1/IoJzKC4mWliqis ep9FH4ywR6Kl4PFyj2UvF7l+Ottu4pJlmCyVjDwh6wYqQJfmChyRLy4tA7LlAY+ayq+y LIJudXPAuteCjwJs8Mc31mL3uiKMiWvbdVViqhvlw+KEtrRs89tZEzrxmI5O/69cAPTj /Jpg== X-Gm-Message-State: AAQBX9eC5DF95o4MVASwy987X8pr2meGm9bwpLVHcEBFxufkciTfWhPv zkwu+JiEH/NyApgmfps+AVS3Ry2M4dQ= X-Google-Smtp-Source: AKy350aHZVcjCFUqzm4UUGHESJAQ6yzD/lFHtsr9IExv7Gz1jYRvPjn/OzG4QrCUUNxeWRmRvNgOuw== X-Received: by 2002:a25:dac3:0:b0:b8b:cb81:ea4f with SMTP id n186-20020a25dac3000000b00b8bcb81ea4fmr10518289ybf.63.1682383335668; Mon, 24 Apr 2023 17:42:15 -0700 (PDT) Received: from nostalgia-for-inf-0 ([204.111.132.134]) by smtp.gmail.com with ESMTPSA id 194-20020a2502cb000000b00b95b616caf2sm3221219ybc.6.2023.04.24.17.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 17:42:15 -0700 (PDT) References: <20230413034059.5585-1-andrewpatt7@gmail.com> <87o7nd109l.fsf@gnu.org> User-agent: mu4e 1.10.2; emacs 30.0.50 From: Andrew Patterson Date: Mon, 24 Apr 2023 19:24:31 -0400 In-reply-to: <87o7nd109l.fsf@gnu.org> Message-ID: <87wn20dc7t.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On Mon, 2023-04-24 at 22:41+02, Ludovic Court=C3=A8s =20 wrote: > Nice! You=E2=80=99re the third person looking into this, which shows=20 > there=E2=80=99s a > real need. :-) > > https://issues.guix.gnu.org/62145 > https://issues.guix.gnu.org/57963 > > I like that your patch is simple (it doesn=E2=80=99t try to do anything=20 > beyond > serializing SXML); perhaps there are ideas to borrow from the=20 > patch by > Taiju HIGASHI? > > OTOH it=E2=80=99s less convenient to use for someone who=E2=80=99s not fa= miliar=20 > with the > XML schema of =E2=80=98fonts.conf=E2=80=99 than what the patch by conses = does. > > I think we should really move forward on this. Because it=E2=80=99s not > invasive, this patch sounds like the path of least resistance. Thanks! > What are your thoughts, people? What should we choose? :-) Brain dump below: My patch was an attempt to do the least work to get fontconfig configuration working, so I agree on it being the simplest option. (As I would, being it's author.) Whatever we end up with shouldn't break existing configurations,=20 of course, and should have /some/ way to add arbitrary XML=20 configuration, preferably as SXML. Both general principles and the other patches suggest we should have an actual configuration record, though, with slots for default font families, additional font directories, and extra SXML config. IMHO, the main design question for this is whether the default font family slots should be single font family names, leaving setting up default fonts with fallback fonts as a complex case written in SXML, or should be a list of font families. The list of font families is more annoying for the common case,=20 but my fonts.conf does have fallback defaults, so it is useful. home-fontconfig-service-type probably should be taken out of %base-home-services, as Taiju HAGASHI's patch eventually did, but that scope creep looks like it was part of why the patch went nowhere. I like the idea of conses' record, but it seems like it'd be awkward in practice? An example config might help. My write-fontconfig-doctype hack was definitely a bad idea:=20 calling thunks in the SXML with the output port as current-output-port doesn't seem to be a purposeful feature, and just writing the doctype tag separately is more clear. It seems to me that the main options are: 1) Just use my patch, or 2) write a new patch with an actual configuration record type, based on conses and Taiju HAGASHI's patches, either with a) a single font family for the default font family settings, b) a list of font families for the default font families, or c) allowing either. If we don't want to just use my patch, I can work on a new patch with a configuration record. How do you print a deprecation warning? --=20 Andrew Patterson From unknown Sun Jun 22 04:29:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 May 2023 12:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Patterson Cc: conses , 62806@debbugs.gnu.org, Andrew Tropin Received: via spool by 62806-submit@debbugs.gnu.org id=B62806.168380850516365 (code B ref 62806); Thu, 11 May 2023 12:36:02 +0000 Received: (at 62806) by debbugs.gnu.org; 11 May 2023 12:35:05 +0000 Received: from localhost ([127.0.0.1]:49957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px5Vh-0004Ft-GL for submit@debbugs.gnu.org; Thu, 11 May 2023 08:35:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px5Ve-0004FG-7O for 62806@debbugs.gnu.org; Thu, 11 May 2023 08:35:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px5VY-00082M-Ij; Thu, 11 May 2023 08:34:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=2kkddaRzX37ljjUJDTQ/aspFh4VtfVGGtDGZth74eLY=; b=T2GaxMzR+e214i81pIeb gkQHRtGoN9cCIFPaKWw207XfMLb0tn76Zm9lZr4jBf5otG6Cx0oGxchHmNgzzRIgEpY1T/uSSmGUP d0R9AptqDZvkL25TjlQo1l5SQSGcMDa/i/7JryaKJDBWU6PW6id8ZWZDB7aoAT7N/WssYFT0kYBWA z0SkcaxCle+J9mrJLRr3oINuj/tZhP0kTQ0+c4f8DQdyiz9lajmTkK9ztxyiWQDJfk0A1q6o0M7Vj SJSJI8cTXUR4oLNQdIqGCGTzbHYolwVSHYPmwSVzpNL0PL/YXSFWHgs6GLcYGmdqJHrQyEM6t+XWE lkcJcQd5GHOI8w==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px5VY-0007uB-3b; Thu, 11 May 2023 08:34:56 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230413034059.5585-1-andrewpatt7@gmail.com> <87o7nd109l.fsf@gnu.org> <87wn20dc7t.fsf@gmail.com> Date: Thu, 11 May 2023 14:34:54 +0200 In-Reply-To: <87wn20dc7t.fsf@gmail.com> (Andrew Patterson's message of "Mon, 24 Apr 2023 19:24:31 -0400") Message-ID: <87o7mr3v2p.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, Sorry for the delay and thanks for your feedback. Andrew Patterson skribis: > It seems to me that the main options are: > 1) Just use my patch, or > 2) write a new patch with an actual configuration record type, > based on conses and Taiju HAGASHI's patches, either with > a) a single font family for the default font family settings, > b) a list of font families for the default font families, or > c) allowing either. I went with #1, but that doesn=E2=80=99t prevent us from considering #2 as = an improvement going forward. Conses, Andrews: you=E2=80=99re welcome to share your thoughts! > If we don't want to just use my patch, I can work on a new patch > with a configuration record. How do you print a deprecation > warning? The (guix deprecation) module provides facilities for that. If that=E2=80= =99s too restrictive, use =E2=80=98warning=E2=80=99 from (guix diagnostics). Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 08:35:09 2023 Received: (at control) by debbugs.gnu.org; 11 May 2023 12:35:09 +0000 Received: from localhost ([127.0.0.1]:49961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px5Vk-0004GC-Qr for submit@debbugs.gnu.org; Thu, 11 May 2023 08:35:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px5Vk-0004Fj-3F for control@debbugs.gnu.org; Thu, 11 May 2023 08:35:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px5Ve-00088A-Sc for control@debbugs.gnu.org; Thu, 11 May 2023 08:35:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=WUHPgQBL86WvPwIdbnkqhIUOVPy6Rnv4X8FiQnsPMm8=; b=ZVSUoLysPBBrbf XPs7lsg+tKuqR1RohbPXmtfGEY1h+AY6+HUz+J6hDA10okg5l8ES+89zLPw++5HFvbvZRACRbnjt0 BT4LBBHgwO1FAzr7uXGnA66HgKE/YS9iU2KrGSHJVkOxEZoB09OsoRFI/af/uUlMReEbfCgpcbkrt npuLL4Uf0nm8bRpEu4fx4oiZeAtzF0mQYa4bzfQNHESSG2o6p/7DOzq7gtceEzWDmxRC0nxmz9BwD 8wq/OQAmqsG+ToX5oMH/ULKQn3+KH4qZ2i5jakUgLRknrXhILrdax4ulPx3IcouQfgcrMTRe1nvZD 24ww+jhVnWV3TmDDU7tQ==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px5Ve-0007vV-Fp for control@debbugs.gnu.org; Thu, 11 May 2023 08:35:02 -0400 Date: Thu, 11 May 2023 14:35:01 +0200 Message-Id: <87mt2b3v2i.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #62806 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 62806 quit From unknown Sun Jun 22 04:29:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 May 2023 06:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Andrew Patterson Cc: conses , 62806@debbugs.gnu.org, me@mianmoreno.com Received: via spool by 62806-submit@debbugs.gnu.org id=B62806.168387395029309 (code B ref 62806); Fri, 12 May 2023 06:46:01 +0000 Received: (at 62806) by debbugs.gnu.org; 12 May 2023 06:45:50 +0000 Received: from localhost ([127.0.0.1]:53862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMXG-0007cf-0F for submit@debbugs.gnu.org; Fri, 12 May 2023 02:45:50 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:39049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMXC-0007cN-0I for 62806@debbugs.gnu.org; Fri, 12 May 2023 02:45:48 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id EE5FE6000E; Fri, 12 May 2023 06:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1683873939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pG2nLnERkN0fq3k5hbBIrOEkuxT20QOIDX1/wkrVqAU=; b=j2tnguHThO2lo51XeKwR2X+W794OGyDbl4GsmgrX9vRVgxXAVcQwEWyfEVSSbN+83E6Ole kg+FqGFtGNhQwp2atelSE9lwMM4iu07gphAX9F3LG7lRjRURdmFFtJiL5Ud/iPNAYEkFte UCQjdoVmY3LmGjsBxSlpAeAOdxfy8sUFoQwgIoO0aPOLHQLv/8hUJsl6Hehfj93EWWvlDg QmI2VDGAeKwoVi1jXb/tgOVV57rIKvd49WnAKpZdaNujE8wOUdhy5/RLRATcT8v4XaEZMh 8ACDNUx54riRvpOAagUWJMBRA9zBzMi5EzbDO90J2HIM3xSJd4vxLrUq/AZYvg== From: Andrew Tropin In-Reply-To: <87o7mr3v2p.fsf_-_@gnu.org> References: <20230413034059.5585-1-andrewpatt7@gmail.com> <87o7nd109l.fsf@gnu.org> <87wn20dc7t.fsf@gmail.com> <87o7mr3v2p.fsf_-_@gnu.org> Date: Fri, 12 May 2023 10:45:35 +0400 Message-ID: <87a5yajbe8.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2023-05-11 14:34, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > Sorry for the delay and thanks for your feedback. > > Andrew Patterson skribis: > >> It seems to me that the main options are: >> 1) Just use my patch, or >> 2) write a new patch with an actual configuration record type, >> based on conses and Taiju HAGASHI's patches, either with >> a) a single font family for the default font family settings, >> b) a list of font families for the default font families, or >> c) allowing either. > > I went with #1, but that doesn=E2=80=99t prevent us from considering #2 a= s an > improvement going forward. Conses, Andrews: you=E2=80=99re welcome to sh= are > your thoughts! The implementation LGTM and probably it covers most of use cases mentioned on the related threads, however, I'm a little bit rusty on this topic and can't say it for sure :) I think Miguel (conses) have more to say on this, because AFAIR he recently did something related to fontconfig configuration. > >> If we don't want to just use my patch, I can work on a new patch >> with a configuration record. How do you print a deprecation >> warning? > > The (guix deprecation) module provides facilities for that. If that=E2= =80=99s > too restrictive, use =E2=80=98warning=E2=80=99 from (guix diagnostics). > > Thanks! > > Ludo=E2=80=99. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmRd4I8ACgkQIgjSCVjB 3rAsnQ/+I/mF+lQQ7pcOPz4RPDvSOH1ILL0rEwhWYoJLsxq4TDsmAleiNxc5bEZi l0h1OquZL5nTnSmdQCHU9YA6E9Bd8GGmH56EpkvvatM/9rrWZWa0FWo+A4lqZrW1 uJQeZQSjvuOK3BBnXzLXC/KVtKW2csWHQhoRPf6TktfQdKUm/L5KpjTJ30V9on1H daw7aUvPgxFEGswnOkw4AQuVypo6t4JRII3gpUxhKvBy1tf8uGblglFQWdtqTE7e W95zxGIbIAKQzkW9fmpiZ4kj/VXW1nbe8/4N2fEYyhbvpFREwIdLcKxCmY21GV++ lySI2AAVejE7FlsiZ1nC0mBC0zbfcjUD3iPcBc0ZvvSyUlqLp6/n2JesCNbIhQ1x g8Ln3RzAfIwelbPdKkWZVGT2qelATm5dSAobDrK0vzG6X4lcvqN7Zd7XjK6TKrZ9 jcpDC/nhxhsvLRcslbPXcjZOWZ6oBwVDgOxj5VdQIGil8iDamwjKOvNTpQejho+S lIqXBWFp68rGhoHjW7kkwepH4ldhZL8v5b5hvhrumwRbq+LTy0QpWes95+1xkzAp IUCTrayvMjbQCYrVtEszEPaIKQPGgUxpga3Q+ZrOIsKPvvo2EX/T/oIc3yumXEFm zEFaLIWTmZuDPCUaJm+/fEG+CSHV6ampU+0ztKWUApOUjYCcei4= =PHr7 -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 04:29:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments. Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Moreno Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 May 2023 09:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62806@debbugs.gnu.org Received: via spool by 62806-submit@debbugs.gnu.org id=B62806.168440267316199 (code B ref 62806); Thu, 18 May 2023 09:38:02 +0000 Received: (at 62806) by debbugs.gnu.org; 18 May 2023 09:37:53 +0000 Received: from localhost ([127.0.0.1]:52045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pza52-0004D7-2T for submit@debbugs.gnu.org; Thu, 18 May 2023 05:37:53 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:56193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzZfo-0003ab-V3 for 62806@debbugs.gnu.org; Thu, 18 May 2023 05:11:50 -0400 Received: (Authenticated sender: me@mianmoreno.com) by mail.gandi.net (Postfix) with ESMTPSA id E8C40E0004 for <62806@debbugs.gnu.org>; Thu, 18 May 2023 09:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mianmoreno.com; s=gm1; t=1684401102; 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: in-reply-to:in-reply-to:references:references; bh=LazOTz7vVTD7wKzct2WmJDqwujw+D4evRdMqkcWUroQ=; b=SePI8sPFLFL/l0IPzrOPqXQBsAC5Oazh3nd1IU2vVyjZy4ktna/Suwo9IlZpdYl27CWEbk 1MVKqglgwtP1S/sDMgS9iK2Fuz5d8Jlyu70MKgVmrfjnYjLBpLUrGmUW7dkCddXRh+gGzq GnTxJmmfK6CtOz7Drhedzl0H7KYQikKN4PoaxvaJtR0NoIv5HO7f+5saf5268743RhrL1N FoQe5syuDIbinuWNGnywJzp5P3StUsnT+J7jUK2M3GkxsWd3WmNm3xN2msecPh7v0DoAbr wGAwJ9z8SjMWOcommzY7IxeNWXzEeh6mp7PCbEbAPObRxE8K6/YZURfloNozGg== From: Miguel =?UTF-8?Q?=C3=81ngel?= Moreno In-Reply-To: <87a5yajbe8.fsf@trop.in> (Andrew Tropin's message of "Fri, 12 May 2023 10:45:35 +0400") References: <20230413034059.5585-1-andrewpatt7@gmail.com> <87o7nd109l.fsf@gnu.org> <87wn20dc7t.fsf@gmail.com> <87o7mr3v2p.fsf_-_@gnu.org> <87a5yajbe8.fsf@trop.in> Date: Thu, 18 May 2023 11:11:40 +0200 Message-ID: <86o7mihulv.fsf@mianmoreno.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.1 (/) X-Mailman-Approved-At: Thu, 18 May 2023 05:37:49 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) On 2023-05-12 10:45, Andrew Tropin wrote: > On 2023-05-11 14:34, Ludovic Court=C3=A8s wrote: > >> Hi Andrew, >> >> Sorry for the delay and thanks for your feedback. >> >> Andrew Patterson skribis: >> >>> It seems to me that the main options are: >>> 1) Just use my patch, or >>> 2) write a new patch with an actual configuration record type, >>> based on conses and Taiju HAGASHI's patches, either with >>> a) a single font family for the default font family settings, >>> b) a list of font families for the default font families, or >>> c) allowing either. >> >> I went with #1, but that doesn=E2=80=99t prevent us from considering #2 = as an >> improvement going forward. Conses, Andrews: you=E2=80=99re welcome to s= hare >> your thoughts! > > The implementation LGTM and probably it covers most of use cases > mentioned on the related threads, however, I'm a little bit rusty on > this topic and can't say it for sure :) > Yeah, I think it's not as intrusive as Taiju's or mine. > I think Miguel (conses) have more to say on this, because AFAIR he > recently did something related to fontconfig configuration. > Not really, since this is more of a general approach, we can add the font records and default families as part of RDE for those who want a more batteries-included approach. >> >>> If we don't want to just use my patch, I can work on a new patch >>> with a configuration record. How do you print a deprecation >>> warning? >> >> The (guix deprecation) module provides facilities for that. If that=E2= =80=99s >> too restrictive, use =E2=80=98warning=E2=80=99 from (guix diagnostics). >> >> Thanks! >> >> Ludo=E2=80=99. --=20 Best regards, Miguel =C3=81ngel Moreno