From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iN6lDOc2N2NRRQAAbAwnHQ (envelope-from ) for ; Fri, 30 Sep 2022 20:35:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iEqUDOc2N2NtOgEAauVa8A (envelope-from ) for ; Fri, 30 Sep 2022 20:35:19 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D381E25784 for ; Fri, 30 Sep 2022 20:35:18 +0200 (CEST) Received: from localhost ([::1]:38076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeKqz-0001OI-TC for larch@yhetil.org; Fri, 30 Sep 2022 14:35:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeKqk-0001Mz-8c for guix-patches@gnu.org; Fri, 30 Sep 2022 14:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeKqk-0005Vu-07 for guix-patches@gnu.org; Fri, 30 Sep 2022 14:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oeKqj-0007Fw-Ri for guix-patches@gnu.org; Fri, 30 Sep 2022 14:35:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v4 2/2] home: fontutils: Support user's fontconfig. Resent-From: liliana.prikler@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Sep 2022 18:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57963 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Taiju HIGASHI , 57963@debbugs.gnu.org Cc: ludo@gnu.org, andrew@trop.in Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.166456285827837 (code B ref 57963); Fri, 30 Sep 2022 18:35:01 +0000 Received: (at 57963) by debbugs.gnu.org; 30 Sep 2022 18:34:18 +0000 Received: from localhost ([127.0.0.1]:42920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeKq1-0007Eu-TT for submit@debbugs.gnu.org; Fri, 30 Sep 2022 14:34:18 -0400 Received: from mail-ej1-f65.google.com ([209.85.218.65]:36603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeKpz-0007Eh-BC for 57963@debbugs.gnu.org; Fri, 30 Sep 2022 14:34:16 -0400 Received: by mail-ej1-f65.google.com with SMTP id 13so10822223ejn.3 for <57963@debbugs.gnu.org>; Fri, 30 Sep 2022 11:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date; bh=vzU0A+Oak/A5HLWxU5lqbpgJsKcJnhKsPk9crDvLX3Y=; b=RgS6bakqL9zcpodAl9Qum0fnkfDNiR9zSecz1VbT6g4f404CCO8T9Tg500wpZMnETg MQot2y0JR6Uys75N8eKOgfOucboPGpPv1t7E8Bgj1fr8ykWejt2SH0ea1DImG/cYm2Rn aBMPjbbDcFcPXF3y1FajWJtyVyD+YxKHK51uir2S4TCDQFgCrnj5+u0VGWj9kiaPxk56 6p7APkM+fJmBf8HpzG18nVulOfJ55DrUk6kDlp3PKMh+dK59xPETXvNP8uLb3YoPsJh8 3vu5gRIYw3PIXjwat2lUCNmmrSmX2lZmMB+BWW/d8bqV6f/plEuaeg0KbHHMFfN+s9ig J0ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date; bh=vzU0A+Oak/A5HLWxU5lqbpgJsKcJnhKsPk9crDvLX3Y=; b=ojGD+T7g08iBzIomhoRimX1l/Um/e1zwJHcm78TGuNBT/Vry6y2TRdHNkcYOV2V/92 2uOzZ70vNweIVoXWzSIXbntCIUnS2/KUKFJedwrmA20/DOWdAluhhUc2BhZzaYF+nyMP WAEj7vskYcBI8u9aIE+etStSJe+PxxPhIrQes5ZUSP2ajhm4BKWgvFAUEp/6zgLjpkyf NiUrrGF35D7kMiOBWeWpRc2lDJXw3Fc5+RyT1gYjteRv44HCiEb2pbt+LY7qttP4wFnZ 9Uw+a1BD+7qU9QGzkxZzVWLBxTzSZBmuuRc8UHG57Guy045YBQtydT8roqUSGywyXzvb lTmQ== X-Gm-Message-State: ACrzQf2Ob/JkKIMVyvGRJmH3vRVmTKr+jO5OsYbExis2l7nTY5iDbQyS 1zXrrJF5GF4N+7u0lRzjQhs= X-Google-Smtp-Source: AMsMyM571jdX+S3frVLyNmvglZeoRGTBjoQ+Pe3yGc6MymS38+QpB9LBtyFp8ZP1YxWuf+CzunPcGA== X-Received: by 2002:a17:906:8455:b0:773:c45b:d970 with SMTP id e21-20020a170906845500b00773c45bd970mr7353670ejy.46.1664562849570; Fri, 30 Sep 2022 11:34:09 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id f27-20020a17090631db00b0073cf6ec3276sm1477196ejf.207.2022.09.30.11.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 11:34:09 -0700 (PDT) Message-ID: <3e28e656526b901a3fd099d1cd180528f24e15e7.camel@gmail.com> From: liliana.prikler@gmail.com Date: Fri, 30 Sep 2022 20:34:08 +0200 In-Reply-To: <20220929143633.28844-2-higashi@taiju.info> References: <20220929143633.28844-1-higashi@taiju.info> <20220929143633.28844-2-higashi@taiju.info> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664562919; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vzU0A+Oak/A5HLWxU5lqbpgJsKcJnhKsPk9crDvLX3Y=; b=RfHjes3JzUc/qrnzA/1rz3Rb4zG5SYlw1VeGSFPJhteJcwtW6TvidGLMiHezxjHrc6LS7M vlW1cNbmtxShiXuVVuWeR4No7S6Yv+GhRVFI5VR6If0VX+TsqBg0xUdQLQ5uCeIlLNtieI LZ8fwKQt8EyPaFL0K6briLwKaYXGn6qTTjnXEW3Blb3kt3GguGNFdsdT9LUohrvywEJSfq oulZ4bowwc8quZcDtN5q9L97tojnqR0/yHrF3WhHF2aels4oC6JSLQml1U0ZtZgR802eG3 Burbdo1Bgxw4YeLFJ/IxuIVU4DsE5IYozzEGy35irbde8y2N88T9lrlbGHnWHw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664562919; a=rsa-sha256; cv=none; b=KfxMuzPY6+RPCYLmDyvEEEN/2/8YW2f8n4+bS8I85a1DByC8iV4GXhc8WQ17L+YLVPeXZx mgCiqD75XTzumQVH9IVgc+jgidA3dNmcu7wuuzgFA5P3GKvGz/AQKW8mjLDm5VauwLGgiV Gd9A8lijEgEAUQx8/rcKkzjCm/UMvzjm/REmTVULZO2IqcciE31AZWoBtDA2qYM+17ae2m jVOGV74qV8Yy6KELZKhnbBFIbFBtUa6BBslQJ+NqO7zkjuJqeeX9dbYwOcJREVqPkhYOjt 8FjHNCB55rIuOBkEKfvPdSPjQHf69yUsetoC+iiTA31uqrDQ4smvgd6vOjOatw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RgS6bakq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RgS6bakq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D381E25784 X-Spam-Score: 5.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6tOhwmTvpSUz Am Donnerstag, dem 29.09.2022 um 23:36 +0900 schrieb Taiju HIGASHI: > * gnu/home/services/fontutils.scm: Support user's fontconfig. > --- > =C2=A0gnu/home/services/fontutils.scm | 86 ++++++++++++++++++++++++++++++= - > -- > =C2=A01 file changed, 80 insertions(+), 6 deletions(-) >=20 > diff --git a/gnu/home/services/fontutils.scm > b/gnu/home/services/fontutils.scm > index 6062eaed6a..32127740f6 100644 > --- a/gnu/home/services/fontutils.scm > +++ b/gnu/home/services/fontutils.scm > @@ -1,6 +1,7 @@ > =C2=A0;;; GNU Guix --- Functional package management for GNU > =C2=A0;;; Copyright =C2=A9 2021 Andrew Tropin > =C2=A0;;; Copyright =C2=A9 2021 Xinglu Chen > +;;; Copyright =C2=A9 2022 Taiju HIGASHI > =C2=A0;;; > =C2=A0;;; This file is part of GNU Guix. > =C2=A0;;; > @@ -20,9 +21,16 @@ > =C2=A0(define-module (gnu home services fontutils) > =C2=A0=C2=A0 #:use-module (gnu home services) > =C2=A0=C2=A0 #:use-module (gnu packages fontutils) > +=C2=A0 #:use-module (gnu services configuration) > =C2=A0=C2=A0 #:use-module (guix gexp) > +=C2=A0 #:use-module (guix records) > +=C2=A0 #:use-module (srfi srfi-1) > +=C2=A0 #:use-module (sxml simple) > +=C2=A0 #:use-module (ice-9 match) > =C2=A0 > -=C2=A0 #:export (home-fontconfig-service-type)) > +=C2=A0 #:export (home-fontconfig-service-type > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 home-= fontconfig-configuration > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 defau= lt-font)) > =C2=A0 > =C2=A0;;; Commentary: > =C2=A0;;; > @@ -33,15 +41,81 @@ (define-module (gnu home services fontutils) > =C2=A0;;; > =C2=A0;;; Code: > =C2=A0 > -(define (add-fontconfig-config-file he-symlink-path) > +(define (default-font-sanitizer type) > +=C2=A0 (lambda (value) > +=C2=A0=C2=A0=C2=A0 (if (null? value) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 value > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(alias > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (family ,type) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (prefer > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (family ,va= lue)))))) > + > +(define-record-type* default-font > +=C2=A0 make-default-font > +=C2=A0 default-font? > +=C2=A0 (serif default-font-serif > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (default '()) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (sanitize (default-font= -sanitizer 'serif))) > +=C2=A0 (sans-serif defalut-font-sans-serif default-font-sans-serif > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (default '()) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (sanitize (default-font-sanitizer 'sans-serif))) > +=C2=A0 (monospace default-font-monospace > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (default '()) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (sanitize (default-font-sanitizer 'monospace)))) Rather than having a null default and sanitizing the field as here, can we have an #f default and omit the field? Btw. I'm not sure whether making this an extra record is the right idea. Wouldn't "default-(serif|sans-serif|monospace)-family" at the root make more sense? Cheers