Font installed in non-default profile doesn't appear.

  • Done
  • quality assurance status badge
Details
3 participants
  • Sarah Morgensen
  • Maxim Cournoyer
  • George Clemmer
Owner
unassigned
Submitted by
George Clemmer
Severity
normal
G
G
George Clemmer wrote on 10 May 2018 17:56
(address . bug-guix@gnu.org)
87603vy05l.fsf@gmail.com
George Clemmer <myglc2@gmail.com> writes:

Toggle quote (32 lines)
> Alex Kost <alezost@gmail.com> writes:
>
>> Hello George,
>>
>> George Clemmer (2018-05-08 20:04 -0400) wrote:
>>
>>> In a "headless" vm-image (sysi29.scm, attached), "font-dejavu" installed
>>> by manifest (attached) into the "empty" default profile ...
>>>
>>> 'guix package -m manifest'
>>>
>>> ... appears in the emacs 'M-x menu-set-font' choice box. But it doesn't
>>> appear with the same manifest installed in the "foo" profile ...
>>
>> To make fonts available from a non-standard profile I added the
>> following line into my "~/config/fontconfig/fonts.conf":
>>
>> <dir>~/path-to-my-profile/share/fonts</dir>
>
> Thank you Alex!
>
> On the chance it might be useful to someone else, this ...
>
> <?xml version="1.0"?>
> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
> <!-- /etc/fonts/fonts.conf file to configure system font access -->
> <fontconfig>
> <dir>~/path-to-my-profile/share/fonts</dir>
> </fontconfig>
>
> ... in "~/.config/fontconfig/fonts.conf" worked for me ;-)

Given that this works, ISTM this can be fixed by placing ...

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<dir>share/fonts</dir>
</fontconfig>

... in "/etc/fonts/fonts.conf".

WDYT? - George
M
M
Maxim Cournoyer wrote on 5 Oct 2020 07:46
(name . George Clemmer)(address . myglc2@gmail.com)(address . 31403@debbugs.gnu.org)
87mu11jkce.fsf@gmail.com
merge 31403 22138
thanks

Hello,

George Clemmer <myglc2@gmail.com> writes:

Toggle quote (16 lines)
> George Clemmer <myglc2@gmail.com> writes:
>
>> Alex Kost <alezost@gmail.com> writes:
>>
>>> Hello George,
>>>
>>> George Clemmer (2018-05-08 20:04 -0400) wrote:
>>>
>>>> In a "headless" vm-image (sysi29.scm, attached), "font-dejavu" installed
>>>> by manifest (attached) into the "empty" default profile ...
>>>>
>>>> 'guix package -m manifest'
>>>>
>>>> ... appears in the emacs 'M-x menu-set-font' choice box. But it doesn't
>>>> appear with the same manifest installed in the "foo" profile ...

Assuming you run Emacs in that foo profile and don't see the font,
that's probably because XDG_DATA_DIRS is unset in that other profile.
glib is one of the package setting that variable.

I'm merging this bug with 22138, which would fix the root cause.

Thanks,

Maxim
S
S
Sarah Morgensen wrote on 13 Sep 2021 04:29
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 31403@debbugs.gnu.org)
86h7epjji1.fsf@mgsn.dev
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
Toggle quote (16 lines)
>>>> George Clemmer (2018-05-08 20:04 -0400) wrote:
>>>>
>>>>> In a "headless" vm-image (sysi29.scm, attached), "font-dejavu" installed
>>>>> by manifest (attached) into the "empty" default profile ...
>>>>>
>>>>> 'guix package -m manifest'
>>>>>
>>>>> ... appears in the emacs 'M-x menu-set-font' choice box. But it doesn't
>>>>> appear with the same manifest installed in the "foo" profile ...
>
> Assuming you run Emacs in that foo profile and don't see the font,
> that's probably because XDG_DATA_DIRS is unset in that other profile.
> glib is one of the package setting that variable.
>
> I'm merging this bug with 22138, which would fix the root cause.

Will this be fixed by #50358? If so, could you close this when that is
merged?

Thanks,

--
Sarah
M
M
Maxim Cournoyer wrote on 15 Sep 2021 06:04
(name . Sarah Morgensen)(address . iskarian@mgsn.dev)(address . 31403@debbugs.gnu.org)
87tuimo56j.fsf@gmail.com
Hi!

Sarah Morgensen <iskarian@mgsn.dev> writes:

Toggle quote (20 lines)
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>>>>> George Clemmer (2018-05-08 20:04 -0400) wrote:
>>>>>
>>>>>> In a "headless" vm-image (sysi29.scm, attached), "font-dejavu" installed
>>>>>> by manifest (attached) into the "empty" default profile ...
>>>>>>
>>>>>> 'guix package -m manifest'
>>>>>>
>>>>>> ... appears in the emacs 'M-x menu-set-font' choice box. But it doesn't
>>>>>> appear with the same manifest installed in the "foo" profile ...
>>
>> Assuming you run Emacs in that foo profile and don't see the font,
>> that's probably because XDG_DATA_DIRS is unset in that other profile.
>> glib is one of the package setting that variable.
>>
>> I'm merging this bug with 22138, which would fix the root cause.
>
> Will this be fixed by #50358? If so, could you close this when that is
> merged?

The above statement turned out to be untrue at the time; fontconfig used
to not honor XDG_DATA_DIRS. That's now the case with the newest
fontconfig release, if XDG_DATA_DIRS is set (which probably won't -- due
to 22138), Emacs should be able to discover fonts in a different profile
than the user or system profiles.

Maxim
M
M
Maxim Cournoyer wrote on 18 Nov 2022 15:18
(name . George Clemmer)(address . myglc2@gmail.com)(address . 31403-done@debbugs.gnu.org)
87h6ywtkg9.fsf@gmail.com
Hi,

George Clemmer <myglc2@gmail.com> writes:

Toggle quote (47 lines)
> George Clemmer <myglc2@gmail.com> writes:
>
>> Alex Kost <alezost@gmail.com> writes:
>>
>>> Hello George,
>>>
>>> George Clemmer (2018-05-08 20:04 -0400) wrote:
>>>
>>>> In a "headless" vm-image (sysi29.scm, attached), "font-dejavu" installed
>>>> by manifest (attached) into the "empty" default profile ...
>>>>
>>>> 'guix package -m manifest'
>>>>
>>>> ... appears in the emacs 'M-x menu-set-font' choice box. But it doesn't
>>>> appear with the same manifest installed in the "foo" profile ...
>>>
>>> To make fonts available from a non-standard profile I added the
>>> following line into my "~/config/fontconfig/fonts.conf":
>>>
>>> <dir>~/path-to-my-profile/share/fonts</dir>
>>
>> Thank you Alex!
>>
>> On the chance it might be useful to someone else, this ...
>>
>> <?xml version="1.0"?>
>> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
>> <!-- /etc/fonts/fonts.conf file to configure system font access -->
>> <fontconfig>
>> <dir>~/path-to-my-profile/share/fonts</dir>
>> </fontconfig>
>>
>> ... in "~/.config/fontconfig/fonts.conf" worked for me ;-)
>
> Given that this works, ISTM this can be fixed by placing ...
>
> <?xml version="1.0"?>
> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
> <!-- /etc/fonts/fonts.conf file to configure system font access -->
> <fontconfig>
> <dir>share/fonts</dir>
> </fontconfig>
>
> ... in "/etc/fonts/fonts.conf".
>
> WDYT? - George

What was this bug about exactly? Having fonts installed to arbitrary
profiles usable by the system? If so, I think that's out of scope.
Note that installing fonts to a profile where XDG_DATA_DIRS is set
should now be discoverable by fontconfig.

I'm closing the issue, but feel free to reopen it if I missed something.

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 31403@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 31403
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch