From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GNc9D5juNGP1EAEAbAwnHQ (envelope-from ) for ; Thu, 29 Sep 2022 03:02:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mMFLD5juNGMRQQEA9RJhRA (envelope-from ) for ; Thu, 29 Sep 2022 03:02:16 +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 CB5E13AF2F for ; Thu, 29 Sep 2022 03:02:15 +0200 (CEST) Received: from localhost ([::1]:57850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odhwM-0003zd-V1 for larch@yhetil.org; Wed, 28 Sep 2022 21:02:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odhwA-0003zT-SM for guix-patches@gnu.org; Wed, 28 Sep 2022 21:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odhwA-00078v-HL for guix-patches@gnu.org; Wed, 28 Sep 2022 21:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odhwA-0002O0-0L for guix-patches@gnu.org; Wed, 28 Sep 2022 21:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH 0/1] Support user's fontconfig. Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Sep 2022 01:02: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 57963@debbugs.gnu.org, liliana.prikler@gmail.com, andrew@trop.in Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.16644132779120 (code B ref 57963); Thu, 29 Sep 2022 01:02:01 +0000 Received: (at 57963) by debbugs.gnu.org; 29 Sep 2022 01:01:17 +0000 Received: from localhost ([127.0.0.1]:35311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odhvQ-0002N2-Or for submit@debbugs.gnu.org; Wed, 28 Sep 2022 21:01:17 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]:43536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odhvM-0002Mn-CP for 57963@debbugs.gnu.org; Wed, 28 Sep 2022 21:01:15 -0400 Received: by mail-pj1-f47.google.com with SMTP id g1-20020a17090a708100b00203c1c66ae3so3078343pjk.2 for <57963@debbugs.gnu.org>; Wed, 28 Sep 2022 18:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date; bh=pEgxaCCqS2a+2A14dL+iCU24oYV9w+GO7yVnXwP/gm4=; b=iWETxRSXFnIyNhYj+K6hkzvA0aN4jrr11ryLXjw0cRb0J+yHyHn6mCFwUDbG4wb+iL rICvbew88PZlIjX2W9bIQYikjoDiPcHQ7tP5DhhVSA07A360UADiAC/3W//S7gpCdcVk T6UtNqBZcuVQDIGeu2NHNC1NC2J7hDXQQxu7GunmUB+HPW+bmyrT1L0iFBVt2d85EVTB y36ZzSxKXFSIzN+zM+h2LRUBddDQEqmMEh/UFPNr2OOHSby8Of3UKXCroNISlXklxXI6 7G1F0ZqYA4FtGNQkQLTqY6NQL5vKkELbG9kQGZZJl0wECSQJ3n1BxZ0rGHdwEGC2+ySa VHlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=pEgxaCCqS2a+2A14dL+iCU24oYV9w+GO7yVnXwP/gm4=; b=4aT4/2WAy8alPB7xNBzONU0qhE0ksFt13ujutyR1QWoUEUfAdFa8I0ZR4eGDh15XzK D6vNmYXVSGbn6KF+AfPIDVfF31VWtxiamABXEyCqFQUpgL6/Nc57X+xIqm8U7EIce8Wo OcFecOIrG79AiD5lShJvd9d0SHMt+O0ehcSrvcO/I+zy7TZndWSUbeD1qQKZAMZdYeEr X3WZxq9H/1yZ/Lw/HWZCZV86yEIY/B3NFUzmfnCaUF9VWoH8BFonWeK6jerZ6uvjwqww 3j9DoMTZJATzoxESyEA3TkTdSH4YiLQ5NiMVdpBrrQplv2klb3XPTSs9iI9PPl2cELBe tCAg== X-Gm-Message-State: ACrzQf2ydgHJNBaKZN/LSMQeXp3WQapz7Ng8s/sYKOdn6cxrzIRuYN/6 +LI0bqmlMrCqFUvZgMfc7el/Qw== X-Google-Smtp-Source: AMsMyM4Z7Aa4s83gEamhEr7eIp/pbXX4GhtCISQThpFx9R4SoNYeKUMm3r+wyEWM8fXd/nkl5AfCkg== X-Received: by 2002:a17:902:b718:b0:17a:d64:de09 with SMTP id d24-20020a170902b71800b0017a0d64de09mr796632pls.106.1664413266379; Wed, 28 Sep 2022 18:01:06 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id i2-20020a17090332c200b001751c61d3b8sm4518117plr.211.2022.09.28.18.01.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 18:01:06 -0700 (PDT) From: Taiju HIGASHI References: <20220927095525.26431-1-higashi@taiju.info> <87bkr1qg9x.fsf@taiju.info> <87v8p7dwvc.fsf_-_@gnu.org> Date: Thu, 29 Sep 2022 10:01:03 +0900 In-Reply-To: <87v8p7dwvc.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 28 Sep 2022 23:15:03 +0200") Message-ID: <87y1u3ngds.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1664413336; 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=pEgxaCCqS2a+2A14dL+iCU24oYV9w+GO7yVnXwP/gm4=; b=uJKC14QwYkj7CueSQMXW3MFq3TXybE4FsrHDWbxX0j0hr04m6vz+y+axBm6Yh0taAK8Hzx Dy/Zyvok/VDA3/OmEfeNQzpcb/N6FAfmYGipM/WNJqgMvqRvbmEPfBiBUXbg3eRSfz1C7p /9wGOyjWLhluSdguH0Lb5or+CkSUmI7qXkIAil/LcsPbdFDZgAqLRa33BBJtSuyqk3Lhg2 pC4umAl58tcvBP5aNRS+hfdhNmgYD8JA10GiCJ82VtH9Gga0swc8W8fgOylFSfkqqTFHUP PXP0XmMvcK9X0MBsiEklyJchVOOhwuI5Dewy/r23Z+8Nbrz8a6jdLdVJpnmV4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664413336; a=rsa-sha256; cv=none; b=mrKuc209QlUAByBzVvbTfvGrKW+LgJvxTpLTrRGyFG2zWLuqzgUY+FRqeB7HlsW1BE20fF o3BYAb+mr8TdGHAtdZ2MsL4FFWSqtGuuVHURJBWWpGbt1CMYoFNEyTvuMz6eGuE2CRlMKk E4vEmpz8TzRhC2GK56zBe1CQeCf16tj13E+kpIBDQGbuq7GPYiHj9I04CkBUr51puIHT4y rU3ETloH8B7fothGLHekd6IKwqpua/Wt/WpLdG7y5YN4hlXPxnbWIDE7ZxppHl9ITW5xUH pAfgGQ92ViL7h+gQwcNyFCAIF91bSYD/b7vVNkus39LP5RDZGH0bSzOS6K/SxA== 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=iWETxRSX; 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: 2.55 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=iWETxRSX; 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: CB5E13AF2F X-Spam-Score: 2.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: klwi/yasUQE/ Ludovic Court=C3=A8s writes: > Hi, > > Taiju HIGASHI skribis: > >> 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. >> >> (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))))))) > > Looks nicer IMO! > >>> +(define (home-fontconfig-extend original-config extend-configs) >>> + (home-fontconfig-configuration >>> + (inherit original-config) >>> + (font-directories >>> + (append >>> + (home-fontconfig-configuration-font-directories original-confi= g) >>> + (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. > > It=E2=80=99s unusual for a service to receive extensions that are the full > configuration object of that service. Because then, indeed, you have to > determine how to =E2=80=9Cmerge=E2=80=9D those configuration objects. > > The common patterns that we have are: > > 1. The service accepts as extensions things that represent part of its > configuration and where merging makes sense. > > For example, nginx can be extended with > objects, but not with a full-blown > . > > 2. Similar, but the service has specific records for extensions. > > The example that comes to mind is =E2=80=98home-bash-service-type=E2= =80=99, which > accepts records as its extensions. Thank you. I understand well. I felt out of place because there was no service that can full configuration such this one. > So=E2=80=A6 > > I wonder, should we, as a first commit, move > =E2=80=98home-fontconfig-service-type=E2=80=99 out of the essential servi= ces to a > =E2=80=98%base-home-services=E2=80=99 variable yet to be defined? > > I don=E2=80=99t see any good reason to have it here (=E2=80=9Cessential= =E2=80=9D services should > be limited to those that may not be replaced or removed; in (gnu > system), this includes services that depend on information available in > ). > > Once we=E2=80=99ve done that, perhaps we can forget about extensions, at = least > for now, and let users who need to configure things write: > > (modify-services %base-home-services > (home-fontconfig-service-type > config =3D> =E2=80=A6)) > > WDYT? I found out what essential services should be. I'm going to move it from essential services to base-home-services. >> 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.) > > Hmm. > > Once we=E2=80=99ve settled on an interface, the commit that makes this ch= ange > should include an update of doc/guix.texi. Yes. I can write the draft, but I may have to ask you to finish it because I'm not good at writing English. It would be a waste of time for you to spend a long time correcting my poor grammar and expressions. Thanks, --=20 Taiju