GNU bug report logs - #41344
Font broken in GUI application with guix pack

Previous Next

Package: guix;

Reported by: Alexandros Theodotou <alex <at> zrythm.org>

Date: Sun, 17 May 2020 04:07:02 UTC

Severity: normal

Done: Marius Bakke <mbakke <at> fastmail.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 41344 in the body.
You can then email your comments to 41344 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#41344; Package guix. (Sun, 17 May 2020 04:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexandros Theodotou <alex <at> zrythm.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 17 May 2020 04:07:02 GMT) Full text and rfc822 format available.

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

From: Alexandros Theodotou <alex <at> zrythm.org>
To: bug-guix <at> gnu.org
Subject: Font broken in GUI application with guix pack
Date: Sun, 17 May 2020 05:05:39 +0100
[Message part 1 (text/plain, inline)]
Hi,

This is the command I ran to generate a pack:
guix pack -RR -S /opt/zrythm/bin=bin -L . zrythm

I then tried moving this pack to a VM running another distro
(archlinux) and all letters are shown as boxes. I have asked other
people to test it on other distros, including debian, and they reported
the same issue.

I am not exactly sure what is missing. Attaching a screenshot of what
it looks like.

I tried adding a propagated input for font-cantarell, font-gnu-freefont 
and font-dejavu just to see if it would work, without success.

Thanks,
Alex
[Screenshot from 2020-05-16 20-11-20.png (image/png, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#41344; Package guix. (Tue, 19 May 2020 13:44:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Alexandros Theodotou <alex <at> zrythm.org>
Cc: 41344 <at> debbugs.gnu.org
Subject: Re: bug#41344: Font broken in GUI application with guix pack
Date: Tue, 19 May 2020 15:43:11 +0200
Hi,

Alexandros Theodotou <alex <at> zrythm.org> skribis:

> This is the command I ran to generate a pack:
> guix pack -RR -S /opt/zrythm/bin=bin -L . zrythm
>
> I then tried moving this pack to a VM running another distro
> (archlinux) and all letters are shown as boxes. I have asked other
> people to test it on other distros, including debian, and they reported
> the same issue.
>
> I am not exactly sure what is missing. Attaching a screenshot of what
> it looks like.
>
> I tried adding a propagated input for font-cantarell, font-gnu-freefont 
> and font-dejavu just to see if it would work, without success.

Did it work roughly before the ‘core-updates’ merge?

Our ‘fontconfig’ package searches ~/.guix-profile/share/fonts and
/run/current-system/profile/share/fonts by default, which obviously
doesn’t work on foreign distros.

As discussed on IRC, could you check “strace -f” the program and check
where it’s looking for fonts (TTFs?)?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#41344; Package guix. (Tue, 19 May 2020 17:50:02 GMT) Full text and rfc822 format available.

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

From: Alexandros Theodotou <alex <at> zrythm.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 41344 <at> debbugs.gnu.org
Subject: Re: bug#41344: Font broken in GUI application with guix pack
Date: Tue, 19 May 2020 18:49:00 +0100
[Message part 1 (text/plain, inline)]
> Did it work roughly before the ‘core-updates’ merge?

This is the first time I tried `guix pack` so I don't know.

> As discussed on IRC, could you check “strace -f” the program and
> check
> where it’s looking for fonts (TTFs?)?

I'm not really sure what to look for. Here is the strace -f output: 
https://www.zrythm.org/downloads/trace.text.tar.gz

The package I'm trying to pack is zrythm-next from here:
https://git.zrythm.org/cgit/guix-repo/tree/audio.scm

Thanks,
Alex

On Tue, 2020-05-19 at 15:43 +0200, Ludovic Courtès wrote:
> 
> 
> 
> Our ‘fontconfig’ package searches ~/.guix-profile/share/fonts and
> /run/current-system/profile/share/fonts by default, which obviously
> doesn’t work on foreign distros.
> 
> 
> 
> Thanks,
> Ludo’.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#41344; Package guix. (Tue, 19 May 2020 18:12:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Alexandros Theodotou <alex <at> zrythm.org>, 41344 <at> debbugs.gnu.org
Subject: Re: bug#41344: Font broken in GUI application with guix pack
Date: Tue, 19 May 2020 20:11:20 +0200
[Message part 1 (text/plain, inline)]
Alexandros Theodotou <alex <at> zrythm.org> writes:

> Hi,
>
> This is the command I ran to generate a pack:
> guix pack -RR -S /opt/zrythm/bin=bin -L . zrythm
>
> I then tried moving this pack to a VM running another distro
> (archlinux) and all letters are shown as boxes. I have asked other
> people to test it on other distros, including debian, and they reported
> the same issue.
>
> I am not exactly sure what is missing. Attaching a screenshot of what
> it looks like.

Can you try the patch posted at
<https://lists.gnu.org/archive/html/guix-devel/2020-05/msg00281.html> ?

When no fonts are installed in the common Guix profiles, applications
only "see" the font hard-coded into fontconfig, which happens to be
broken[*] since the recent 'core-updates' merge for any application
using Pango (such as GTK+).

[*] because fontconfig currently uses "gs-fonts", which are bitmap only,
and Pango no longer supports bitmap fonts[**]
[**] https://gitlab.gnome.org/GNOME/pango/issues/386
[signature.asc (application/pgp-signature, inline)]

Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Wed, 20 May 2020 22:02:04 GMT) Full text and rfc822 format available.

Notification sent to Alexandros Theodotou <alex <at> zrythm.org>:
bug acknowledged by developer. (Wed, 20 May 2020 22:02:04 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: guix-devel <at> gnu.org
Subject: Re: [PATCH] gnu: fontconfig: Add replacement with font-dejavu instead
 of gs-fonts.
Date: Thu, 21 May 2020 00:00:39 +0200
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:

> On Sun, May 17, 2020 at 04:50:12PM +0200, Marius Bakke wrote:
>> This is a hack to make (some) fonts working when users don't have fonts
>> specified in their system configuration, and (crucially) places where
>> the fontconfig cache may be unavailable such as 'guix pack's.
>> 
>> I'm not sure whether font-dejavu is a good replacement here.  Another
>> approach could be to convert gs-fonts to TrueType or OpenType format.
>> 
>> Thoughts?  I don't know much about fonts and would appreciate feedback.
>
> I think you should push right away, assuming that it helps and doesn't
> rebuild the world.

I pushed the patch as ab9de8cfb0525ef43668712ac898707f97f9a620.

I verified that it fixes the immediate problem with fonts in the Guix
manual (#41282) as well as 'guix pack' (#41344).  It should also provide
a decent fallback for cases where the user did not explicitly install
any fonts such as in #41241.

Hoping for angry reports now about why such a poor replacement font was
chosen.  ;-)
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 18 Jun 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 305 days ago.

Previous Next


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