all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Patterson <andrewpatt7@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: conses <contact@conses.eu>,
	62806@debbugs.gnu.org, Andrew Tropin <andrew@trop.in>
Subject: [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments.
Date: Mon, 24 Apr 2023 19:24:31 -0400	[thread overview]
Message-ID: <87wn20dc7t.fsf@gmail.com> (raw)
In-Reply-To: <87o7nd109l.fsf@gnu.org>


On Mon, 2023-04-24 at 22:41+02, Ludovic Courtès <ludo@gnu.org> 
wrote:

> Nice!  You’re the third person looking into this, which shows 
> there’s a
> real need.  :-)
>
>   https://issues.guix.gnu.org/62145
>   https://issues.guix.gnu.org/57963
>
> I like that your patch is simple (it doesn’t try to do anything 
> beyond
> serializing SXML); perhaps there are ideas to borrow from the 
> patch by
> Taiju HIGASHI?
>
> OTOH it’s less convenient to use for someone who’s not familiar 
> with the
> XML schema of ‘fonts.conf’ than what the patch by conses does.
>
> I think we should really move forward on this.  Because it’s not
> invasive, this patch sounds like the path of least resistance.

Thanks!

> What are your thoughts, people?  What should we choose?  :-)

Brain dump below:

My patch was an attempt to do the least work to get fontconfig
configuration working, so I agree on it being the simplest option.
(As I would, being it's author.)
Whatever we end up with shouldn't break existing configurations, 
of
course, and should have /some/ way to add arbitrary XML 
configuration,
preferably as SXML.

Both general principles and the other patches suggest we should
have an actual configuration record, though, with slots for
default font families, additional font directories, and extra SXML
config.  IMHO, the main design question for this is whether the
default font family slots should be single font family names,
leaving setting up default fonts with fallback fonts as a complex
case written in SXML, or should be a list of font families.
The list of font families is more annoying for the common case, 
but
my fonts.conf does have fallback defaults, so it is useful.

home-fontconfig-service-type probably should be taken out of
%base-home-services, as Taiju HAGASHI's patch eventually did, but
that scope creep looks like it was part of why the patch went
nowhere.

I like the idea of conses' <font-spec> record, but it seems like
it'd be awkward in practice?  An example config might help.

My write-fontconfig-doctype hack was definitely a bad idea: 
calling
thunks in the SXML with the output port as current-output-port
doesn't seem to be a purposeful feature, and just writing the
doctype tag separately is more clear.

It seems to me that the main options are:
1) Just use my patch, or
2) write a new patch with an actual configuration record type,
   based on conses and Taiju HAGASHI's patches, either with
   a) a single font family for the default font family settings,
   b) a list of font families for the default font families, or
   c) allowing either.

If we don't want to just use my patch, I can work on a new patch
with a configuration record.  How do you print a deprecation
warning?

-- 
Andrew Patterson




  reply	other threads:[~2023-04-25  2:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  3:40 [bug#62806] [PATCH] gnu: home: services: fontutils: Add support for SXML fragments Andrew Patterson
2023-04-24 20:41 ` Ludovic Courtès
2023-04-24 23:24   ` Andrew Patterson [this message]
2023-05-11 12:34     ` Ludovic Courtès
2023-05-12  6:45       ` Andrew Tropin
2023-05-18  9:11         ` Miguel Ángel Moreno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn20dc7t.fsf@gmail.com \
    --to=andrewpatt7@gmail.com \
    --cc=62806@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=contact@conses.eu \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.