From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EFoACbTMMmOJhAAAbAwnHQ (envelope-from ) for ; Tue, 27 Sep 2022 12:13:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8Mc0CbTMMmNjtwAA9RJhRA (envelope-from ) for ; Tue, 27 Sep 2022 12:13:08 +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 C98A529033 for ; Tue, 27 Sep 2022 12:13:07 +0200 (CEST) Received: from localhost ([::1]:57134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od7aM-0001Cy-AV for larch@yhetil.org; Tue, 27 Sep 2022 06:13:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od7YM-0006MI-LC for guix-patches@gnu.org; Tue, 27 Sep 2022 06:11:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od7YM-0002HI-Az for guix-patches@gnu.org; Tue, 27 Sep 2022 06:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1od7YL-0005H6-UK for guix-patches@gnu.org; Tue, 27 Sep 2022 06:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v3] home: fontutils: Support user's fontconfig. Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 27 Sep 2022 10:11: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: 57963@debbugs.gnu.org Cc: ludo@gnu.org, liliana.prikler@gmail.com, andrew@trop.in Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.166427344520254 (code B ref 57963); Tue, 27 Sep 2022 10:11:01 +0000 Received: (at 57963) by debbugs.gnu.org; 27 Sep 2022 10:10:45 +0000 Received: from localhost ([127.0.0.1]:52899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7Y5-0005Gb-4F for submit@debbugs.gnu.org; Tue, 27 Sep 2022 06:10:45 -0400 Received: from mail-pl1-f172.google.com ([209.85.214.172]:47098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od7Y3-0005GN-8Y for 57963@debbugs.gnu.org; Tue, 27 Sep 2022 06:10:44 -0400 Received: by mail-pl1-f172.google.com with SMTP id jm5so8610489plb.13 for <57963@debbugs.gnu.org>; Tue, 27 Sep 2022 03:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date; bh=YpxXAcq9OtgPl97wgSmIkkpj2vNjWQruXMCC4W12HDE=; b=ZgT62yeOBvnxKhkZ+GJBCfmb/h5G8EhW/AjAjdFGwH1rNBamk8rwIxfuuUIlXxzJGB BTGoNE4p7rKHv3BGQ5jK1LwQeSkL726r/igP8OzxKSdKIvS63R7mw+L4lA9B23c08HBa K8+7Pg5pWYG3BACBup7029RkTAzkxHxBHTg/7r+UItO4RhE5XS7yDCcU4U0c2IrbmIz3 CR76A6Z72l46ehZ0SoScRaVMUS6t1H4hOR1uPS9Df2ci69KnQwc4BEchsFdeiPPqB44i l+jdGp1hqoDCUBlN3y78HsWzejx3IY19bfnEggNbYVsKW/NwnvbB8lDaKGynzCAkspn0 Cq3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date; bh=YpxXAcq9OtgPl97wgSmIkkpj2vNjWQruXMCC4W12HDE=; b=ckukx4Iq88/fztewX6bnlVFL6OWpgSUO1SJf3NT7NuT0QBy+PKe1DQqImJlvmWlD9M mb5Y4bQ5CX9whnNU2dKhR21kD04QKtupo+IqmJUxsyi7bMwazNHShheCC9uLaZbtE/XH qTQXAYCyRQwes7y/JhR02qHamEdvS9knLlccZB/5L+vmIvw7JuwpiWHCtRyx2sJcVnd5 uvaFekHt0NAr/P2LjK09dkarAiV1qVSZ75W0BrXckjxlCye5D5xoXFohSoC+sdn1UNiA A8HwQepzGr1fPsef25ghkcUMV2uNl5p4LsK996z5FgVRrGFRlzUyrfViki1otVFj5XWx dfcg== X-Gm-Message-State: ACrzQf3M5J11Bfzokf852bXAq7RfeEfyU/AaU+9RI55uedos3P+HEYOg +YeDmP4QmA37Bw+1AjAmBz1UEg== X-Google-Smtp-Source: AMsMyM6QeRPUogIbe0tsynLKWXGnGbmhnmnIN9ZM0GLXTvT3fK4iAAe1vdBMWz5ZLTRLUAGMSaZTmA== X-Received: by 2002:a17:902:7e42:b0:178:489:86ac with SMTP id a2-20020a1709027e4200b00178048986acmr26831689pln.68.1664273437479; Tue, 27 Sep 2022 03:10:37 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id c10-20020a170903234a00b00177e5d83d3dsm1109464plh.170.2022.09.27.03.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 03:10:37 -0700 (PDT) From: Taiju HIGASHI References: <20220927095525.26431-1-higashi@taiju.info> Date: Tue, 27 Sep 2022 19:10:34 +0900 In-Reply-To: <20220927095525.26431-1-higashi@taiju.info> (Taiju HIGASHI's message of "Tue, 27 Sep 2022 18:55:25 +0900") Message-ID: <87bkr1qg9x.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664273587; 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: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=YpxXAcq9OtgPl97wgSmIkkpj2vNjWQruXMCC4W12HDE=; b=krjVOARvtdZxS12x7XZJSB6K5MZaBtIN41n2RNdSgfiSghM9rjBIMjA9FHRqHi+2Rbmxb3 YraLImj8FYrGreav+d6GVMADFyH0T01V/w8+VYXVTB4dQSmLTwohdUoEE38OK2gM2HqTmf Y/M/9I7m8OemSjDoMd2xr+PMpZ8KKD1rsXLZGgGYBOLhjgpuhAnRUilBJhrUjzTRRlrkLQ QgsDnp1squLAkeGZ85rW1G71SK7lIQRoMZJ5p4//DTU3JDUI7PpYcUYJ9c8WFBYsXtoxGY /oaI0uc1QUJ8KU7aZbGmKcmEHp8x+AFLTFR7+XS4G5rhfbSgoasoGPitwiX92Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664273587; a=rsa-sha256; cv=none; b=J20GHDcOUqF7TNpGxuc5dLm69tOIqKtf45dwy7OqF2MCehadQm2EWP/0DSW8/5+MVtTBPP DMeDZVGtoRLiS8VpVltsEjaawbkb6ZvkXrvRa3cZfe85QcCjMGfAlmAfBnogVVXNbUGCl0 gSM5vbTU7kw0Gzi3fh0EjzJ37tbaHF3IYmm0N/Ze9hmfBtxlYC2PUZespKhDKMYQtbZh3k w6CYdRLKNhT0d7t5rzkJtoxpSJIr4YiDmGufYJ5z6He6DKQvgixO0LKoV29CszvGpVm6fC w8tqGf8kgjxig6hQwoa0BNBoQdV2rh0SfCxaFiF7UkNicIKqcwOKcH08E41iRg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=ZgT62yeO; dmarc=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: 4.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=ZgT62yeO; dmarc=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: C98A529033 X-Spam-Score: 4.16 X-Migadu-Scanner: scn1.migadu.com X-TUID: /Kr46AfkS7oB Hi, I just sent you the v3 patch. I have changed only the interface of `preferred-defalut-font` slightly from what I suggested the other day. We configure the service as follows. --8<---------------cut here---------------start------------->8--- (simple-service 'my-fontconfig-service home-fontconfig-service-type (home-fontconfig-configuration (font-directories (list "~/fonts")) (preferred-default-font (default-font (serif "Noto Serif CJK JP") (sans-serif "Noto Sans CJK JP") (monospace "PlemolJP Console"))) (extra-config `((match (@ (target font)) (edit (@ (mode assign) (name antialias)) (bool true))))))) --8<---------------cut here---------------end--------------->8--- I didn't understand it properly, but `home-fontconfig-service-type` is pre-registered as `essential-services` and needs to be extended using `simple-service`. > +(define (home-fontconfig-extend original-config extend-configs) > + (home-fontconfig-configuration > + (inherit original-config) > + (font-directories > + (append > + (home-fontconfig-configuration-font-directories original-config) > + (append-map home-fontconfig-configuration-font-directories extend-configs))) > + (preferred-default-font > + (home-fontconfig-configuration-preferred-default-font > + (if (null? extend-configs) > + original-config > + (last extend-configs)))) This is the part I am most concerned about, not sure if replacing the preferred-default-font setting with the last setting is the proper way to go about it. I wanted to write a test as well, but since it was to be handled by gexp, I could not figure out how to write a test that would validate the gexp result using only exported methods. (I would like to write tests for serialized functions that are private functions.) Cheers, -- Taiju