Re: Missing fonts issue with GNU Icecat

2019-01-05 Thread Ludovic Courtès
Hi Ricardo,

Ricardo Wurmus  skribis:

>> Resolved by applying this advice (which is output when running `guix
>> package -i pango` explicitly, but not when pango is installed as a
>> dependency -- or I missed it):
>>
>> ```
>> The following environment variable definitions may be needed:
>>   export
>> XDG_DATA_DIRS="$HOME/.guix-profile/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
>>   export
>> GIO_EXTRA_MODULES="$HOME/.guix-profile/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES"
>> ```
>
> I’m glad you figured this out.  I wonder if this means that we should
> change the icecat package to set these variables (e.g. by adding a shell
> wrapper).

This is what ‘glib-or-gtk-build-system’ does.  It would be worth trying
to change IceCat to use that build system.

Ludo’.



Re: Missing fonts issue with GNU Icecat

2018-12-28 Thread Mike Gerwitz
On Thu, Dec 27, 2018 at 14:43:23 +0100, Daniel Gerber wrote:
> Resolved by applying this advice (which is output when running `guix package
> -i pango` explicitly, but not when pango is installed as a dependency -- or
> I missed it):
>
> ```
> The following environment variable definitions may be needed:
>   export
> XDG_DATA_DIRS="$HOME/.guix-profile/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
>   export
> GIO_EXTRA_MODULES="$HOME/.guix-profile/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES"
> ```

Thanks for sharing.  I can confirm that setting only XDG_DATA_DIRS works
in a container to solve the font issue.  Setting XDG_DATA_HOME works as
well. 

I don't need to set GIO_EXTRA_MODULES in order to get it to work (I
don't even have that directory on in my profile).

-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com


signature.asc
Description: PGP signature


Re: Missing fonts issue with GNU Icecat

2018-12-28 Thread Mike Gerwitz
On Fri, Dec 28, 2018 at 16:07:12 +0100, Ricardo Wurmus wrote:
>> ```
>> The following environment variable definitions may be needed:
>>   export
>> XDG_DATA_DIRS="$HOME/.guix-profile/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
>>   export
>> GIO_EXTRA_MODULES="$HOME/.guix-profile/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES"
>> ```
>
> I’m glad you figured this out.  I wonder if this means that we should
> change the icecat package to set these variables (e.g. by adding a shell
> wrapper).

Only XDG_DATA_DIRS (or XDG_DATA_HOME) are needed for me in a
container.  Is GIO_EXTRA_MODULES actually needed for anything?  I don't
even have a `lib/gio' directory in my profile.

> What do others think?

Yes, please.  IceCat is effectively completely broken without this on
foreign distros and within containers.  It looks like on GuixSD
XDG_DATA_DIRS is set in /etc/profile; I never had to set it manually.

But the presence in /etc/profile implies to me that there are other
packages that require this variable to be present.  Should those
packages also have wrapper scripts?

-- 
Mike Gerwitz


signature.asc
Description: PGP signature


Re: Missing fonts issue with GNU Icecat

2018-12-28 Thread Ricardo Wurmus


Hi Daniel,

> Resolved by applying this advice (which is output when running `guix
> package -i pango` explicitly, but not when pango is installed as a
> dependency -- or I missed it):
>
> ```
> The following environment variable definitions may be needed:
>   export
> XDG_DATA_DIRS="$HOME/.guix-profile/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
>   export
> GIO_EXTRA_MODULES="$HOME/.guix-profile/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES"
> ```

I’m glad you figured this out.  I wonder if this means that we should
change the icecat package to set these variables (e.g. by adding a shell
wrapper).

What do others think?

> (Besides, the web site gives other mailing lists (not in the info
> manual)... maybe help-guix is better suited for this kind of issues.)

As it turns out that this might require changes to the icecat package,
maybe guix-devel is appropriate after all :) For other questions like
this, however, I’d suggest to ask on help-guix first.  Either way,
thanks for bringing this to our attention.

--
Ricardo




Re: Missing fonts issue with GNU Icecat

2018-12-27 Thread Daniel Gerber
Resolved by applying this advice (which is output when running 
`guix package -i pango` explicitly, but not when pango is 
installed as a dependency -- or I missed it):


```
The following environment variable definitions may be needed:
  export 
  XDG_DATA_DIRS="$HOME/.guix-profile/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
  export 
  GIO_EXTRA_MODULES="$HOME/.guix-profile/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES"

```

(Besides, the web site gives other mailing lists (not in the info 
manual)... maybe help-guix is better suited for this kind of 
issues.)




Missing fonts issue with GNU Icecat

2018-12-27 Thread Daniel Gerber

Hi guix,

I have a profile with icecat, fontconfig and basic fonts, but the 
browser seems not to find any font. It displays only 
numbers-in-squares placeholders.


```
$ icecat
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Pango-WARNING **: 10:16:13.107: failed to create cairo scaled 
font, expect ugly output. the offending font is 'DejaVu Sans 
9.9990234375'
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Pango-WARNING **: 10:16:13.107: font_face status is: file not 
found
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Pango-WARNING **: 10:16:13.108: scaled_font status is: file not 
found
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Pango-WARNING **: 10:16:13.108: shaping failure, expect ugly 
output. shape-engine='PangoFcShapeEngine', font='DejaVu Sans 
9.9990234375', text='●'
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Pango-WARNING **: 10:16:13.113: failed to create cairo scaled 
font, expect ugly output. the offending font is 'DejaVu Sans 
9.9990234375'
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Pango-WARNING **: 10:16:13.114: font_face status is: file not 
found
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Pango-WARNING **: 10:16:13.114: scaled_font status is: file not 
found
(/gnu/store/x9c8vysvvivx4bc1xa4gz7sl37y3i2k6-icecat-60.3.0-gnu1/lib/icecat/.icecat-real:3240): 
Gtk-WARNING **: 10:16:14.576: Could not load a pixbuf from 
/org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg.
This may indicate that pixbuf loaders or the mime database could 
not be found.

```

Utilities from fontconfig (in the same profile) seem to work fine:

```
$ fc-match 'DejaVu Sans 9.9990234375'
DejaVuSans.ttf: "DejaVu Sans" "Book"
$ fc-list | grep DejaVuSans.ttf
~/.guix-profile/share/fonts/truetype/DejaVuSans.ttf
```

Any idea? How can I test if the issue is with pango or icecat or 
somewhere else? The "host" distro is Alpine.



Best,
---
Daniel Gerber