guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig con


From: Taiju HIGASHI
Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration.
Date: Fri, 04 Nov 2022 17:46:43 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Mittwoch, dem 02.11.2022 um 10:43 +0900 schrieb Taiju HIGASHI:
>> Hi,
>>
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>> > Am Donnerstag, dem 27.10.2022 um 14:31 +0900 schrieb Taiju HIGASHI:
>> > > Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>> > >
>> > > > Am Donnerstag, dem 27.10.2022 um 13:00 +0900 schrieb Taiju
>> > > > HIGASHI:
>> > > > > Sorry for the long time it has taken to resolve the issue.
>> > > > > What do you think about it?
>> > > > Putting the discussion with Declan aside, the last thing
>> > > > mentioned
>> > > > was
>> > > > not trying to mix SXML and XML-in-strings.  Ludo offered the
>> > > > solutions:
>> > > > 1. Taking a <fontconfig-configuration> or a file-like object
>> > > > 2. (Optionally) using a gexp-compiler for the former
>> > > >
>> > > > Cheers
>> > >
>> > > Sorry for the lack of clarity.
>> > > I had sent you a past email confirming that the direction of the
>> > > implementation was correct and was waiting for your response.
>> > >
>> > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57963#239
>> > Ahh, I missed that.  If you pull in the XML declarations and the
>> > <fontconfig></fontconfig> stuff to the serialization, you should
>> > basically have most of what you'd need for a G-Exp compiler, but
>> > even
>> > if not it'd simplify this to
>> >
>> > (match
>> >   ((? home-font-config-configuration? config)
>> >    (serialize-... config ...))
>> >   ((? file-like? config) config))
>> >
>> > Not sure if a match for type-checking would be needed since it's
>> > already taken care of elsewhere, so writing it just in case.
>> >
>> > Cheers
>>
>> Sorry for my response delay.
>> Is my recognition correct?  I have plan to rewrite it as below.
>>
>> --8<---------------cut here---------------start------------->8---
>> (define (serialize-fontconfig-configuration config)
>>   (define start-of-fontconfig "<?xml version='1.0'?>
>> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
>> <fontconfig>")
>>
>>   (define end-of-fontconfig "</fontconfig>\n")
>>
>>   (mixed-text-file
>>    "fonts.conf"
>>    start-of-fontconfig
>>    (serialize-configuration config home-fontconfig-configuration-
>> fields)
>>    end-of-fontconfig))
>>
>> (define (add-fontconfig-config-file user-config)
>>   `(("fontconfig/fonts.conf"
>>      ,(match user-config
>>           ((? home-fontconfig-configuration? user-config)
>>            (serialize-fontconfig-configuration user-config))
>>         ((? file-like? user-config) user-config)))))
>> --8<---------------cut here---------------end--------------->8---
> More or less.  For one, I don't think start-of-fontconfig and end-of-
> fontconfig need to be declared.  The (serialize-configuration ) call is
> a little opaque atm, but let's suppose it returns properly formatted
> XML.  Finally, as hinted already and since you're returning a file-like
> object anyway, you may want to make this serializer a gexp-compiler
> instead.
>
> Cheers

Sorry. I did not understand what you meant by making it a gexp-compiler
instead. Is there anything reference documents or codes?

I believe it was presented to me in advance as an optional proposal, but
I do not know what it means and have not been able to respond.

Thanks,
-- 
Taiju





reply via email to

[Prev in Thread] Current Thread [Next in Thread]