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 sH+dCtEDMGOZDwEAbAwnHQ (envelope-from ) for ; Sun, 25 Sep 2022 09:31:29 +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 SJCkCtEDMGMLxwAA9RJhRA (envelope-from ) for ; Sun, 25 Sep 2022 09:31:29 +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 07526283CF for ; Sun, 25 Sep 2022 09:31:28 +0200 (CEST) Received: from localhost ([::1]:51722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocM6p-0000ck-5R for larch@yhetil.org; Sun, 25 Sep 2022 03:31:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocM6R-0000cI-6m for guix-patches@gnu.org; Sun, 25 Sep 2022 03:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocM6Q-0006YP-CL for guix-patches@gnu.org; Sun, 25 Sep 2022 03:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocM6P-00020v-SE for guix-patches@gnu.org; Sun, 25 Sep 2022 03:31:01 -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: Sun, 25 Sep 2022 07:31: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: Liliana Marie Prikler Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 57963@debbugs.gnu.org, Andrew Tropin Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.16640910077650 (code B ref 57963); Sun, 25 Sep 2022 07:31:01 +0000 Received: (at 57963) by debbugs.gnu.org; 25 Sep 2022 07:30:07 +0000 Received: from localhost ([127.0.0.1]:45762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocM5X-0001z7-54 for submit@debbugs.gnu.org; Sun, 25 Sep 2022 03:30:07 -0400 Received: from mail-pj1-f41.google.com ([209.85.216.41]:55123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocM5R-0001xE-SN for 57963@debbugs.gnu.org; Sun, 25 Sep 2022 03:30:06 -0400 Received: by mail-pj1-f41.google.com with SMTP id y11so3680023pjv.4 for <57963@debbugs.gnu.org>; Sun, 25 Sep 2022 00:30:01 -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=yiHRKyg5V5jZ5CkGj+mmWVQe/HoDbcUlRRDbWawN1XU=; b=a/9RpbNPj+NMk9LARArE+An7vY7nzInA75stv3ls1oMiLxfUHWhQdRgrxN54UVpfSA TYjsvtNTqx9wWRqwP5/SQ8l0qQEY0YIubtQqt3VrmAx+HR1xLA85LHJ1JZP0+Pr+UxTn R2XQ/MAH/4GI1RJprcewNDkTY/vpDo6FLy4hLX/eolK4uXujjeSqY4vcp3M/jU+/84cC faaFD8Y/Ac7PgBk3wio77wUfhkcvbW2OveDAHr0/9DCKUYIKbDTWZFS1+eFmbPNMtedP XwE5mttrrrV5tlImTbrddv/9ylYgAHDf386nd7nuZwoaDAO+qC9DtVqBKE0ofQYPoSZa BjxA== 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=yiHRKyg5V5jZ5CkGj+mmWVQe/HoDbcUlRRDbWawN1XU=; b=PO1PhMuHjnpUP/FOAPNeYhjlVRDpMGJlXLUd35cHFER3QtW3t/inKjhU6tEPfDgksa uw188ICwFSwO4nJ2yPNCJJPwoY5wj/xzGKv0TWFLDH/rgiqD9P80r7sXPl+yvq6u7W2l 5M5JgiMznDkjLghf0tJazzF8JRKEKXAWennGTcIAr9hTMXboE+sTwkq62xo1Zy+49oai KibH4Acqgi4HC4XMb7kpezytV1qk3qqsp0yTn1bilAWpDmSJvtF0SiUTUE+aJRzL+rmU rP376FeoyU88LAI2HRFZQ5Blm8G+x2zlJ7DMWyVG7yQxJZr8+5JvHDU4QAbPVmzicSWk 5OmQ== X-Gm-Message-State: ACrzQf2wyLz7065NAGHQvOFgf2wwxhU6yiGqiA8oX53OghtK3ebBiDNG ST2mLTiqMGCi3K/tkMVTqpAKc6cba/i0Mgwb X-Google-Smtp-Source: AMsMyM7RseTE2XoBoMqoq5xPt1ia/vg0PGsRiAh6e51aZj01MkK5Q5+eEWsqWFL6lAPt6yYFWwvdWw== X-Received: by 2002:a17:90a:2b0c:b0:203:b7b1:2ba2 with SMTP id x12-20020a17090a2b0c00b00203b7b12ba2mr18685909pjc.34.1664090995874; Sun, 25 Sep 2022 00:29:55 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id z9-20020a170903018900b00177f4ef7970sm8963840plg.11.2022.09.25.00.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 00:29:55 -0700 (PDT) From: Taiju HIGASHI References: <20220921002721.23511-1-higashi@taiju.info> <20220922012033.30835-1-higashi@taiju.info> <87pmfoq6kt.fsf@trop.in> <87sfkjiyck.fsf@gnu.org> <875yhfwxe9.fsf@taiju.info> <871qs093dq.fsf_-_@gnu.org> <87edw0v0qk.fsf@taiju.info> <0fdb0df07f50700454bf34cbb0d86c46bb9afe79.camel@gmail.com> Date: Sun, 25 Sep 2022 16:29:51 +0900 In-Reply-To: <0fdb0df07f50700454bf34cbb0d86c46bb9afe79.camel@gmail.com> (Liliana Marie Prikler's message of "Sun, 25 Sep 2022 08:25:25 +0200") Message-ID: <87leq7ud1s.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-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=1664091088; 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=yiHRKyg5V5jZ5CkGj+mmWVQe/HoDbcUlRRDbWawN1XU=; b=OiDUk0A8SkbvhVIpxu+f5adfuqhb59MMFo+mKr5eh50l2nmTjF1150pF6INKNqijfT84xT ltHvL8BbbOzao6Ntiawgva2X4/PTnalcCN94OpHoTzYpIfvL2GnwTHfls/MF+iK3pFNIrC B1s5PQSee+P7ZkZcXZxBBoh2HRnm7BVa852gFSQ9ignlbEaLsuASecqWAEXEXqCQiDqWKo Kw6VzqAkOj74F9IfKP60jf5haLpG3o2LwdYJFriALaXp1TIpcbMuMILgXm6Dl+Vl6MKTn4 jl9TdwE96cwynqkSYeRcXfTNWPRZJVJvPHjtgR+omPgcDut3i9DmM+MYey5ahA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664091088; a=rsa-sha256; cv=none; b=eoSIQSJoULrolXcLUvWKgem8fE4ZhnLdpIt7HzZlRIDsQGRaMFHMi9AVZWfqSWAju9OK0L 4pkMIK7v8Sxw8G8eYba1iTWDRA9BB0N1lkVgzqer86yWJQkkQW5aaO2/Mdfm24pgMoExqi YSmErvqSwu+07N9+FRIP/A1IIQQ6e7nWI5V9ekzvdGIORuJva13fGaX6FFfYfmlVGTuISN k9lL9Dvr1VEOsBYLho71l/HDiSNqL6ayStaK2orUlB149DzuM/kqMWu8DCoAKANJQUUFdN xgaU4ph+81SLd+2zj1MMnJpPlkCACkWHtxFIqq9ECQfpHvCAcCQ4ZEiXufieqw== 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="a/9RpbNP"; 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.85 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b="a/9RpbNP"; 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: 07526283CF X-Spam-Score: 2.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: +O1JR9KLzmhQ Liliana Marie Prikler writes: > Am Sonntag, dem 25.09.2022 um 07:58 +0900 schrieb Taiju HIGASHI: >> Ludovic Court=C3=A8s writes: >> >> > Anyway, it does look like your v2 is the way to go, with the >> > obvious caveat that using it is tricky: one needs to know about >> > fontconfig=E2=80=99s config file format and about sxml. >> > >> > Maybe we can go with v2 for now (it provides a useful =E2=80=9Cescape >> > hatch=E2=80=9D) but prepare for more conventional configuration bindin= gs? >> >> By conventional configuration binding, do you mean adding something >> like home-fontconfig-configuration to provide a dedicated=C2=A0 fontconf= ig >> configuration? > I think Ludo means that we should provide the most useful options (like > the fontconfig dirs) as dedicated record fields, while leaving an > "extra-config" escape hatch, that can be used with SXML or a raw string > for stuff that's too complicated (my personal preference would still be > SXML over the raw string, but YMMV). I see. For example, For example, would it be as follows? --8<---------------cut here---------------start------------->8--- (service home-fontconfig-service-type (home-fontconfig-configuration (dir "~/.config/fontconfig/my-fonts1.conf")) (extra-config (list "~/.config/fontconfig/my-fonts2.conf"))) --8<---------------cut here---------------end--------------->8--- >> I have been reading the DTD and think it might be a bit of a >> challenge. >> https://github.com/freedesktop/fontconfig/blob/e291fda7d42e5d64379555097= a066d9c2c4efce3/fonts.dtd >> >> However, I did notice one thing, and that is that there is an include >> element. I thought that if we had a configuration where the include >> element could be added, we could handle most of the use cases. >> What do you think of this idea? > I'd prefer extra-config over include =E2=80=93 extra-config doesn't need = to go > through file-like objects and an additional layer of G-Expression > quoting. > > Cheers It is difficult to determine which rules to define as records, but I thought that if I only had includes, I could handle most use cases. For example, we assume that you will be able to write settings as follows: --8<---------------cut here---------------start------------->8--- (service home-fontconfig-service-type (home-fontconfig-configuration (includes (list (include (path "~/.config/fontconfig/my-fonts1.conf") (ignore-missing #t)))))) --8<---------------cut here---------------end--------------->8--- ref: https://github.com/freedesktop/fontconfig/blob/e291fda7d42e5d643795550= 97a066d9c2c4efce3/fonts.dtd#L59-L74 Would it also fit with your assumption if we could also specify extra-config here? It is difficult to judge whether the ability to specify includes is useful or not, though, since extra-config alone will do the job. Thanks, --=20 Taiju