GNU bug report logs - #26877
building fonts: fontcache must be updated regulary

Previous Next

Package: guix;

Reported by: ng0 <ng0 <at> pragmatique.xyz>

Date: Thu, 11 May 2017 08:38:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26877 in the body.
You can then email your comments to 26877 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#26877; Package guix. (Thu, 11 May 2017 08:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ng0 <ng0 <at> pragmatique.xyz>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 11 May 2017 08:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ng0 <ng0 <at> pragmatique.xyz>
To: bug-guix <at> gnu.org
Subject: building fonts: fontcache must be updated regulary
Date: Thu, 11 May 2017 08:36:58 +0000
The problem: Right now after just installing fonts, they do
not become available. This can lead to some applications
appearing "broken", etc. Other operating systems solve this
by having a post-install hook which roughly does just this.

A possible solution:
Our fictional, not yet existing, font-build-system should
run "fc-cache --force --really-force", or we should have
a service which does the same for the fonts installed in
the user profile.
At this point a font-build-system would be good anyway,
as the number of fonts keeps growing, and most fonts are
using similar patterns to be installed.
-- 
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/




Information forwarded to bug-guix <at> gnu.org:
bug#26877; Package guix. (Thu, 11 May 2017 17:48:01 GMT) Full text and rfc822 format available.

Message #8 received at 26877 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: ng0 <ng0 <at> pragmatique.xyz>
Cc: 26877 <at> debbugs.gnu.org
Subject: Re: bug#26877: building fonts: fontcache must be updated regulary
Date: Thu, 11 May 2017 13:46:49 -0400
ng0 <ng0 <at> pragmatique.xyz> writes:

> The problem: Right now after just installing fonts, they do
> not become available. This can lead to some applications
> appearing "broken", etc. Other operating systems solve this
> by having a post-install hook which roughly does just this.
>
> A possible solution:
> Our fictional, not yet existing, font-build-system should
> run "fc-cache --force --really-force",

This cannot work, because the build system code is run within the build
container, where it won't have access to anything in your home
directory.  Furthermore, for most users, the packages are built on
another machine, namely one of our build farm slaves.

Even the build system did somehow have access to your home directory,
building the package is not the right time to run "fc-cache".  On a
multiuser system, if two users request the same derivation, it is only
built for the first user, and the second user simply uses the one that
the first user built.  The relevant time to run "fc-cache" is when the
font is _installed_ in your user profile.

The usual Guix way to handle things like this is to arrange for the font
cache to be part of the profile, and to create a profile hook that
creates the cache from all of the built packages included within.

       Mark




Information forwarded to bug-guix <at> gnu.org:
bug#26877; Package guix. (Thu, 11 May 2017 19:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 26877 <at> debbugs.gnu.org (full text, mbox):

From: ng0 <ng0 <at> pragmatique.xyz>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 26877 <at> debbugs.gnu.org, ng0 <ng0 <at> pragmatique.xyz>
Subject: Re: bug#26877: building fonts: fontcache must be updated regulary
Date: Thu, 11 May 2017 19:47:58 +0000
Mark H Weaver transcribed 1.2K bytes:
> ng0 <ng0 <at> pragmatique.xyz> writes:
> 
> > The problem: Right now after just installing fonts, they do
> > not become available. This can lead to some applications
> > appearing "broken", etc. Other operating systems solve this
> > by having a post-install hook which roughly does just this.
> >
> > A possible solution:
> > Our fictional, not yet existing, font-build-system should
> > run "fc-cache --force --really-force",
> 
> This cannot work, because the build system code is run within the build
> container, where it won't have access to anything in your home
> directory.  Furthermore, for most users, the packages are built on
> another machine, namely one of our build farm slaves.
> 
> Even the build system did somehow have access to your home directory,
> building the package is not the right time to run "fc-cache".  On a
> multiuser system, if two users request the same derivation, it is only
> built for the first user, and the second user simply uses the one that
> the first user built.  The relevant time to run "fc-cache" is when the
> font is _installed_ in your user profile.
> 
> The usual Guix way to handle things like this is to arrange for the font
> cache to be part of the profile, and to create a profile hook that
> creates the cache from all of the built packages included within.
> 
>        Mark
> 

Okay, you are right about the build system. Your approach reads
better, I was just looking for a way to start a discussion on
this. Right now it is not-obviously broken, and we need to fix
it at some point.
-- 
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/




Information forwarded to bug-guix <at> gnu.org:
bug#26877; Package guix. (Thu, 11 May 2017 20:57:01 GMT) Full text and rfc822 format available.

Message #14 received at 26877 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 26877 <at> debbugs.gnu.org, ng0 <ng0 <at> pragmatique.xyz>
Subject: Re: bug#26877: building fonts: fontcache must be updated regulary
Date: Thu, 11 May 2017 22:55:55 +0200
Hi,

Mark H Weaver <mhw <at> netris.org> skribis:

> The usual Guix way to handle things like this is to arrange for the font
> cache to be part of the profile, and to create a profile hook that
> creates the cache from all of the built packages included within.

The problem is that the cache should be mutable so that one can run
“fc-cache -f” after having dropped files in ~/.local/share/fonts, for
instance.

That said, quite surprisingly, I think I never had to run ‘fc-cache’
except in the situation above.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#26877; Package guix. (Sun, 07 Jul 2019 10:50:01 GMT) Full text and rfc822 format available.

Message #17 received at 26877 <at> debbugs.gnu.org (full text, mbox):

From: John Soo <jsoo1 <at> asu.edu>
To: 26877 <at> debbugs.gnu.org
Subject: Fontcache in system profile not updated
Date: Sun, 7 Jul 2019 03:49:40 -0700
Hi!

I reported #36013 to add support for kmscon’s fonts and keybinding configuration. I have a mostly working solution. The one problem I have when testing it is that kmscon cannot find a font even though it is installed in the system profile. I think it is caused by the system profile not having the updated font cache when starting the kmscon service. Does that sound like a reasonable explanation, given #26877?

Thank you!

John



Information forwarded to bug-guix <at> gnu.org:
bug#26877; Package guix. (Sun, 10 Jul 2022 04:28:01 GMT) Full text and rfc822 format available.

Message #20 received at 26877 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Mark H Weaver <mhw <at> netris.org>, 26877 <at> debbugs.gnu.org,
 ng0 <ng0 <at> pragmatique.xyz>
Subject: Re: bug#26877: building fonts: fontcache must be updated regulary
Date: Sun, 10 Jul 2022 00:27:47 -0400
Hello,

ludo <at> gnu.org (Ludovic Courtès) writes:

> Hi,
>
> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> The usual Guix way to handle things like this is to arrange for the font
>> cache to be part of the profile, and to create a profile hook that
>> creates the cache from all of the built packages included within.
>
> The problem is that the cache should be mutable so that one can run
> “fc-cache -f” after having dropped files in ~/.local/share/fonts, for
> instance.
>
> That said, quite surprisingly, I think I never had to run ‘fc-cache’
> except in the situation above.

I've never had to do this in years, although I don't use "loose" fonts
manually installed under ~/.local/share/fonts.

Should we close the issue?  Our fontconfig package now honors fonts
found under XDG_DATA_DIRS, and it seems to just work.

Thanks,

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#26877; Package guix. (Fri, 11 Aug 2023 10:07:01 GMT) Full text and rfc822 format available.

Message #23 received at 26877 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Mark H Weaver <mhw <at> netris.org>,
 Ludovic Courtès <ludo <at> gnu.org>, 26877 <at> debbugs.gnu.org,
 ng0 <ng0 <at> pragmatique.xyz>
Subject: Re: bug#26877: building fonts: fontcache must be updated regulary
Date: Fri, 11 Aug 2023 18:06:24 +0800
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Hello,
>
> ludo <at> gnu.org (Ludovic Courtès) writes:
>
>> Hi,
>>
>> Mark H Weaver <mhw <at> netris.org> skribis:
>>
>>> The usual Guix way to handle things like this is to arrange for the font
>>> cache to be part of the profile, and to create a profile hook that
>>> creates the cache from all of the built packages included within.
>>
>> The problem is that the cache should be mutable so that one can run
>> “fc-cache -f” after having dropped files in ~/.local/share/fonts, for
>> instance.
>>
>> That said, quite surprisingly, I think I never had to run ‘fc-cache’
>> except in the situation above.
>
> I've never had to do this in years, although I don't use "loose" fonts
> manually installed under ~/.local/share/fonts.
>
> Should we close the issue?  Our fontconfig package now honors fonts
> found under XDG_DATA_DIRS, and it seems to just work.


Hello, I think we can close this now, since this commit:

commit 6f12880a76a6c91058718d15845f8b9d9b529a5a
Author: Sarah Morgensen <iskarian <at> mgsn.dev>
Date:   Fri Jun 18 17:52:05 2021 -0700

    gnu: fontconfig: Use (locally) deterministic caching
    
    Make fontconfig use directory contents rather than modification time to
    determine cache validity (by pretending that mtime is broken).

There is no need to run 'fc-cache' manually, and applications just need
close/restart to use newly install fonts (also manual run here doesn't
remove the need of restart).





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Fri, 11 Aug 2023 14:48:02 GMT) Full text and rfc822 format available.

Notification sent to ng0 <ng0 <at> pragmatique.xyz>:
bug acknowledged by developer. (Fri, 11 Aug 2023 14:48:02 GMT) Full text and rfc822 format available.

Message #28 received at 26877-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 宋文武 <iyzsong <at> envs.net>
Cc: Mark H Weaver <mhw <at> netris.org>,
 Ludovic Courtès <ludo <at> gnu.org>, ng0 <ng0 <at> pragmatique.xyz>,
 26877-done <at> debbugs.gnu.org
Subject: Re: bug#26877: building fonts: fontcache must be updated regulary
Date: Fri, 11 Aug 2023 10:47:17 -0400
Hello,

宋文武 <iyzsong <at> envs.net> writes:

[...]

> Hello, I think we can close this now, since this commit:
>
> commit 6f12880a76a6c91058718d15845f8b9d9b529a5a
> Author: Sarah Morgensen <iskarian <at> mgsn.dev>
> Date:   Fri Jun 18 17:52:05 2021 -0700
>
>     gnu: fontconfig: Use (locally) deterministic caching
>     
>     Make fontconfig use directory contents rather than modification time to
>     determine cache validity (by pretending that mtime is broken).
>
> There is no need to run 'fc-cache' manually, and applications just need
> close/restart to use newly install fonts (also manual run here doesn't
> remove the need of restart).

Excellent, I had forgotten about that commit.  Thanks to Sarah for
fixing the issue!

Closing.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 09 Sep 2023 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.