From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 eLrnNUjEUGPSIwAAbAwnHQ (envelope-from ) for ; Thu, 20 Oct 2022 05:45:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ELIHNkjEUGNUDQEA9RJhRA (envelope-from ) for ; Thu, 20 Oct 2022 05:45:12 +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 A472A1CEA0 for ; Thu, 20 Oct 2022 05:45:12 +0200 (CEST) Received: from localhost ([::1]:40468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olMUZ-0005wd-CH for larch@yhetil.org; Wed, 19 Oct 2022 23:45:11 -0400 Received: from [::1] (port=56912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olMUZ-0005d4-8B for larch@yhetil.org; Wed, 19 Oct 2022 23:45:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olMUQ-0005cP-Eu for guix-patches@gnu.org; Wed, 19 Oct 2022 23:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33517) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olMUQ-0008Br-71 for guix-patches@gnu.org; Wed, 19 Oct 2022 23:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olMUP-0006ng-MX for guix-patches@gnu.org; Wed, 19 Oct 2022 23:45: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: Thu, 20 Oct 2022 03:45: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: Declan Tsien Cc: 57963@debbugs.gnu.org, liliana.prikler@gmail.com, Andrew Tropin Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.166623748826106 (code B ref 57963); Thu, 20 Oct 2022 03:45:01 +0000 Received: (at 57963) by debbugs.gnu.org; 20 Oct 2022 03:44:48 +0000 Received: from localhost ([127.0.0.1]:60828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olMUB-0006mz-Gj for submit@debbugs.gnu.org; Wed, 19 Oct 2022 23:44:47 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:35677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olMU6-0006mi-L3 for 57963@debbugs.gnu.org; Wed, 19 Oct 2022 23:44:46 -0400 Received: by mail-pf1-f181.google.com with SMTP id y191so19133858pfb.2 for <57963@debbugs.gnu.org>; Wed, 19 Oct 2022 20:44:42 -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:message-id:reply-to; bh=BUsUsk+f7x0KKIxOnsSbQC7JFstgMA6tF3lFQNDCzhg=; b=l+ThfVll8HmwxqrpUDxJIex7fyNlc8RIl+mP26TwDZckQT4BsJ6eoXbnxO7q1+ZmmJ 2RhuKTv6EBSyRugEI3vJHkow043vOMQJFFW5VUfXh3lb1OAISnHPluv7ZlBcWVytcTSv IqLBAybCYfHXPEChllRSnxW/LVugVnpBAv/pLTInNWzRlCjDMnqykwZ9G+4Xd3AvsQGx ZjFvMvrOFNR/j3y9A+RNheCOXhKKJJnCyPU7TiFPLAt8EJG3FveZG4+9KWLpehKK0HXj uKUFpT3Ab/Z1MiJ4ztUJIEHFtpf+CF9tG+cgrFQlJPVHofDvOjdCNQtR4NU4R02M+MXe BglQ== 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 :message-id:reply-to; bh=BUsUsk+f7x0KKIxOnsSbQC7JFstgMA6tF3lFQNDCzhg=; b=lPX9rAE/i+sHZ4zNBnmLB+1CCXMgZ63i3afRkplu9/t427cTQYTC+Ki/cFSFqZO6Ju d6AhVaErql3sXdJt3+hz/NZhtsYiTQk6DRzN/I3fOjQ+FilP4/LrqjkmYYc3kj0jTPQ8 dEwL2xWaId4r8rXcyB6u0SMO+yb2Bw2Lf/r0due7R3x2t/cGlB69CKpgM48K0crroimK mtMasVMIAlPRKNXAsAwNASApB00TBjKlKTVk/8FSctv4PqdNuMClkCttxKAalIbStDL/ obIWcSEh6Mnoy5hC7oyykkUSXpus4OVTcUZeLasLamxdZOR0skmFJG/LzoDgO3sWRFwm v1Pw== X-Gm-Message-State: ACrzQf2eIVrymIBoSHtX4tS7dJh+wLONAHevjNI/MNKfJImax/LoxygH tH0x6BNPjnyAk0UHxR0HlU6gGw== X-Google-Smtp-Source: AMsMyM45wanlyC1bowHXPpc1FW2xiKnZzHw4j5OMt0j0df/FKAZa4Xfxa01vZRQa/hsf/dqGSex6Zw== X-Received: by 2002:a63:6a85:0:b0:43b:dac2:ff0b with SMTP id f127-20020a636a85000000b0043bdac2ff0bmr10381313pgc.234.1666237476578; Wed, 19 Oct 2022 20:44:36 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id n14-20020a170902d2ce00b0017f36638010sm11603120plc.276.2022.10.19.20.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 20:44:36 -0700 (PDT) From: Taiju HIGASHI References: <87k053sxur.fsf@gnu.org> <87zgdzat99.fsf@trop.in> <87zgdxgx0l.fsf@taiju.info> <875ygiqur9.fsf@gnu.org> <87r0z5e23k.fsf@taiju.info> <87czanebhd.fsf@taiju.info> <87o7u7e1ai.fsf@riseup.net> <87wn8vcm1y.fsf@taiju.info> <87czan45fs.fsf@riseup.net> Date: Thu, 20 Oct 2022 12:44:33 +0900 In-Reply-To: <87czan45fs.fsf@riseup.net> (Declan Tsien's message of "Thu, 20 Oct 2022 10:03:35 +0800") Message-ID: <87zgdrb1lq.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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666237512; 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=BUsUsk+f7x0KKIxOnsSbQC7JFstgMA6tF3lFQNDCzhg=; b=TQN/hhBh9WUkGf4ReC2NSl/kOzfLrK8LFQ0qn2i0W/2HOuVADITq5hmfOL/YsHh95MP0/v 17AP4zLifT4EJ4JWbpAQlf1dXTMitebckMw0Htinae/ul9VeI4/225UAGGXVwbQLMnU6QE z6UluVCCwDm85iiAtD+gH4t5KucrTGTy7LQ2nthfe8W2kDTCpgbEC8VxBZuK6OI4CWiJLm yU0B01kCzk2lNCqYYaiPMv9XVrlSvYdqfo4HwqlhYQxBGHv6y59yeEsqgFfFWm+ExhtQdu JBcZ4TbYB+UAWALdafqYqZ4AMHhBpzXkXhvdNlbM5d6dC6dDDYrj7NObaCpf4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666237512; a=rsa-sha256; cv=none; b=W0XtE9xvuUrHHxCg99mS2t6tEL2CY+BNPPACb48UimuQuKCJZom4K0sA+WG7yY+skyOrHu NrfNEvnVgUzNuF3YJIlGNNkNtBLMidc15D0QTttXuBWLQirv0Qp2nV6XUjfNXbJkoK/EhK GkDY3z/ltVsjgsxTZdXZDDF6SjchA+bWQHIapTxDIZBPI4jS46yfpNxDkNDD18spHeGMQE us9JJyxQNB1JCkH2wygo6kvZrUh3o71lfWxqz0qRrfe88p8xKI/uf+mPRmiJrVPn7JFCDv qCNEl2YJOXhKLkIHRTsrLOXMQWzA6pDGidoHk+KKFTcJSos0INIbRCROn60RPw== 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=l+ThfVll; 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.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=l+ThfVll; 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: A472A1CEA0 X-Spam-Score: 2.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: a90sAOamCxiM Declan Tsien writes: > Taiju HIGASHI writes: > >> >> By the way, should we be able to specify the binding attribute as well? >> > > I checked the fontconfig doc. > https://www.freedesktop.org/software/fontconfig/fontconfig-user.html > Here is the relevant portation: > >> There is one special case to this rule; family names are split into >> two bindings; strong and weak. Strong family names are given greater >> precedence in the match than lang elements while weak family names are >> given lower precedence than lang elements. This permits the document >> language to drive font selection when any document specified font is >> unavailable. > > I guess it's ok to ignore or set a default =strong= when serializing? > If you put the setting below, --8<---------------cut here---------------start------------->8--- (home-fontconfig-configuration (default-font-serif-family "Noto Serif CJK JP") (default-font-sans-serif-family "Noto Sans Serif CJK JP") (default-font-monospace-family "PlemolJP Console")) --8<---------------cut here---------------end--------------->8--- The current implementation serializes below. --8<---------------cut here---------------start------------->8--- ~/.guix-home/profile/share/fonts serif Noto Serif CJK JP sans-serif Noto Sans Serif CJK JP monospace PlemolJP Console --8<---------------cut here---------------end--------------->8--- Since the binding attribute is omitted, it would be interpreted as the default weak. ref: https://github.com/behdad/fontconfig/blob/5b41ded2b0ddb98a07ac86264b94403cb7a0fd82/fonts.dtd#L127-L128 I would like the default-font-* fields to cover only typical settings. Instead, we provide extra-config field to be used for settings that are not typical. You can also configure the settings you want by specifying them in extra-config. --8<---------------cut here---------------start------------->8--- (home-fontconfig-configuration (extra-config '((alias (@ (binding "strong")) (family "sans-serif") (prefer (family "WenQuanYi Micro Hei") (family "Noto Sans"))) (alias (@ (binding "strong")) (family "monospace") (prefer (family "Sarasa Mono CL") (family "Inconsolata") (family "Noto Mono")))))) --8<---------------cut here---------------end--------------->8--- I don't see clearly what the typical configuration of alias should be, but I believe the current specification is sufficient for our needs. Do you still think it is preferable to change the default-font-* field interface, even knowing that you can configure it in the extra-config field? Please give me your frank opinion :) Thanks, -- Taiju