From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 OAVyI/54MGPdfQEAbAwnHQ (envelope-from ) for ; Sun, 25 Sep 2022 17:51:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oH5UI/54MGP5swAAauVa8A (envelope-from ) for ; Sun, 25 Sep 2022 17:51:26 +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 31214FB3 for ; Sun, 25 Sep 2022 17:51:26 +0200 (CEST) Received: from localhost ([::1]:57636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocTue-00018E-Gl for larch@yhetil.org; Sun, 25 Sep 2022 11:51:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocTuJ-00013G-6y for guix-patches@gnu.org; Sun, 25 Sep 2022 11:51:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocTuI-0001lK-TQ for guix-patches@gnu.org; Sun, 25 Sep 2022 11:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocTuI-0002z6-D4 for guix-patches@gnu.org; Sun, 25 Sep 2022 11:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH 0/1] Support user's fontconfig. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Sep 2022 15:51:02 +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 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.166412101211392 (code B ref 57963); Sun, 25 Sep 2022 15:51:02 +0000 Received: (at 57963) by debbugs.gnu.org; 25 Sep 2022 15:50:12 +0000 Received: from localhost ([127.0.0.1]:48380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocTtU-0002xf-4e for submit@debbugs.gnu.org; Sun, 25 Sep 2022 11:50:12 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:37383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocTtR-0002xP-8C for 57963@debbugs.gnu.org; Sun, 25 Sep 2022 11:50:11 -0400 Received: by mail-ed1-f66.google.com with SMTP id a41so6064527edf.4 for <57963@debbugs.gnu.org>; Sun, 25 Sep 2022 08:50:09 -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=ja4YOiToIrAmYSDMz82xgeB7EYr1jvn2jlGFl2z9hJk=; b=hSP8gpSnsIbZtxxNl/XsXiOKveLJbW7KZNfJVhnlSguGOHj50typnncQuAzU7EuGHT gaqAl6sQwrbw86gqArdEuvyB0fUy24SBqD+t3glIUrAEL4+UKBRv9j1jfqS8IuxFcPcN cShtgXxcVqi9h57kZCXjUMlaQJiSN032G9sqz7YYBCgJgyC+IZcuoG+n5Lxd96TwvNkZ c1bt6X01b7xNSp/dkrMV32+RBpuVYAKnRDDveAQefWfTo5YfogQ2XUK2qtOIBhj8m76i faWV29IOf8Dst1+qnUx+JXQZHy7xKSMFx50XWyv1fGTXW+0vyrW4ihQWL3HIUrhWNIKq KikA== 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=ja4YOiToIrAmYSDMz82xgeB7EYr1jvn2jlGFl2z9hJk=; b=knmuRewfX75NhwxqQB+2K+5ql7lFqpQh2B4xSG5y6eUZZzi4Bf398oXg1DRbxTBMoT 6BTclUE7MwWzXLtsZh44LhKEMJZptEEYhenB44Uc4ud6Iz/rH0Nx5OGFmsXEMaMeg46/ 0VlUmHeX0rCcDDpjWo47q2GaOnGJEUcKpD8EHNSaVNSQi6qMitA0ugJ5jzsjlap5VdZl szY3jlDtn6iEu4r2igzmVPteCmVFRYRHzqswmAHjbeClZPMX2zxf20uTrWf2U92fEBC9 cUckRijckH+peaxBcDsKVX26KgRTrJ2vWIAYPf/6rt4wutr9A/3BHWxCiEZi/te2SkSx q7Lg== X-Gm-Message-State: ACrzQf2bI3WwooIVILX8euh5nHceqVhQoilDeHgkDxCancEtHFbeouRO +eASf8QpZKoUaTlN0cLv5QM= X-Google-Smtp-Source: AMsMyM58SHxRpDTvFxACsYU2vhLOk1JlwJI2KX/lC6a5mLiYo7XJngIvsIVkNW82RnkClgwuYn0vYg== X-Received: by 2002:a05:6402:849:b0:453:10c3:2ee3 with SMTP id b9-20020a056402084900b0045310c32ee3mr18495862edz.339.1664121002316; Sun, 25 Sep 2022 08:50:02 -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 b20-20020a17090630d400b007262a5e2204sm6934989ejb.153.2022.09.25.08.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 08:50:01 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Sun, 25 Sep 2022 17:50:00 +0200 In-Reply-To: <87leq7ud1s.fsf@taiju.info> 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> <87leq7ud1s.fsf@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-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=1664121086; 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=ja4YOiToIrAmYSDMz82xgeB7EYr1jvn2jlGFl2z9hJk=; b=Aw7pHbscyOfbbuBLux2wkplPv31Hye8ERxBJD/8xwB6Ap2w/XRwF608Ek90fstadvdi/hf W8y8vKJgzicyFLTr1wu2SFULyDquXSFStY5ThDUpYgMA/gY/RSSjiyqcVd5l6rkPI3dau4 i9diGaP1Ztfj/CJQamBDrsw1OdVDSVJkcsgXMXYxUlkhlLvYhLh1VNgGOScZpaAqEEG7Um LOwsQ7Skka8n2HGotVhmIEhJWoVyT3mIL33Wc+3edODZxWaLQhpogoMthSFWa7ysNNOSum K2mvyd2JNi2KXUMeZx8ciIggWGZOgsKJHtluFzWEdrJYHu0eqLj3uoQ+AFYYlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664121086; a=rsa-sha256; cv=none; b=W6JVt/7/zHbiJWaju/MtmO+Om9LZUNtelsI61p4AuiHeEIR48hf5EHo0szcuWsF6oxLd0q n81NjSy3BR3TxIaKsu4/C5Mq92hQZLON8p97Ar9TfmHDMtZv7zRaf+oEDNwKr3FpyE5mLj /3LQFM+S5pT4JNJ8ZyFMBf8B7UVzRKiCMMaLkNudL2bft5XAc/p1tBhjCZt1FHmtYqx8uI K2y0x1GQxMtFVhSvyh4jaN9i7oT96FT6lVCa9b2osiR1TGiwx80QZ/dy27BlGMAkpALv5K 8rILGq2mukB2f0zVF0KjzQEPOpcRCEd751vS5eOukOrK3n+UaN62VFjzFvqstQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hSP8gpSn; 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: 6.85 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hSP8gpSn; 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: 31214FB3 X-Spam-Score: 6.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: +uZxdWrhtmL7 Am Sonntag, dem 25.09.2022 um 16:29 +0900 schrieb Taiju HIGASHI: > Liliana Marie Prikler writes: >=20 > > Am Sonntag, dem 25.09.2022 um 07:58 +0900 schrieb Taiju HIGASHI: > > > Ludovic Court=C3=A8s writes: > > >=20 > > > > 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. > > > >=20 > > > > Maybe we can go with v2 for now (it provides a useful =E2=80=9Cesca= pe > > > > hatch=E2=80=9D) but prepare for more conventional configuration > > > > bindings? > > >=20 > > > By conventional configuration binding, do you mean adding > > > something > > > like home-fontconfig-configuration to provide a dedicated=C2=A0 > > > fontconfig > > > 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). >=20 > I see.=C2=A0 For example, >=20 > For example, would it be as follows? >=20 > --8<---------------cut here---------------start------------->8--- > (service home-fontconfig-service-type > =C2=A0 (home-fontconfig-configuration > =C2=A0=C2=A0=C2=A0 (dir "~/.config/fontconfig/my-fonts1.conf")) > =C2=A0 (extra-config > =C2=A0=C2=A0=C2=A0 (list > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "~/.config/fontconfig/my-fonts2.conf"= ))) > --8<---------------cut here---------------end--------------->8--- Since you can specify more than one dir, that'd be "dirs" or even something more helpful like "font-directories". Note that those are directories and not config files. You corrected the extra-config thing in your reply, but also be aware of the extra-config as SXML option. >=20 > > > I have been reading the DTD and think it might be a bit of a > > > challenge. > > > https://github.com/freedesktop/fontconfig/blob/e291fda7d42e5d64379555= 097a066d9c2c4efce3/fonts.dtd > > >=20 > > > However, I did notice one thing, and that is that there is an > > > include element.=C2=A0 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 nee= d to > > go through file-like objects and an additional layer of G- > > Expression quoting. > >=20 > > Cheers >=20 > 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. Go for the obvious low-hanging fruits and typical use cases first.=20 Don't just add a field that requires a depth of 3 or more to be useful. > For example, we assume that you will be able to write settings as > follows: >=20 > --8<---------------cut here---------------start------------->8--- > (service home-fontconfig-service-type > =C2=A0 (home-fontconfig-configuration > =C2=A0=C2=A0=C2=A0 (includes > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (include > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (path "~/.config/f= ontconfig/my-fonts1.conf") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (ignore-missing #t= )))))) > --8<---------------cut here---------------end--------------->8--- >=20 > ref: > https://github.com/freedesktop/fontconfig/blob/e291fda7d42e5d64379555097a= 066d9c2c4efce3/fonts.dtd#L59-L74 >=20 > Would it also fit with your assumption if we could also specify > extra-config here? >=20 > It is difficult to judge whether the ability to specify includes is > useful or not, though, since extra-config alone will do the job. Except for possibly some fringe use cases, include will be pointless if you have extra-config, which is a better include :) Cheers