Fonts issue

Pawel Stolowski pawel.stolowski at canonical.com
Thu Jun 30 10:05:20 UTC 2016


Hi Evan,

On 29.06.2016 20:44, Evan Dandrea wrote:
> On Wed, 29 Jun 2016 at 05:20 Pawel Stolowski 
> <pawel.stolowski at canonical.com <mailto:pawel.stolowski at canonical.com>> 
> wrote:
>
>
>     I'm trying to guess what font-related stuff may be missing. I've the
>     following packages installed via stage-packages:
>     - ttf-ubuntu-font-family
>     - xfonts-base
>     - xfonts-scalable
>     - fontconfig-config
>
>     Any idea what else to try?
>
>
> If Tcl/Tk is loading fonts via absolute paths, including some font 
> packages in stage-packages unfortunately won't help. Any files in your 
> snap will install relative to /snap/your_snap/current, not /. Only 
> files in the OS snap can be installed to /.
I managed to get the app working by using desktop/gtk3 launcher 
temporarily. This launcher sets a bunch of environment variables, plus 
some gtk-related stuff (which I don't really need), so now it's just a 
matter of figuring out what's critical and pull it out into a custom 
launcher. And it works in strict mode now.

>
> I ran into this font problem with Jenkins. As it also uses fontconfig, 
> I provided a custom fonts.conf pointed at the needed fonts I put under 
> the snap directory [1, 2].
>
> If that doesn't work and you need to dig deeper, I've found it useful 
> to run programs under ptrace and see what files they open (`strace -f 
> -e file`).
>
> 1: 
> https://github.com/evandandrea/jenkins-snap/blob/master/parts/plugins/x-jenkins.py#L12
> 2: 
> https://github.com/evandandrea/jenkins-snap/blob/master/snapcraft.yaml#L20
Thanks for the links, that's a useful trick. I hope it will soon be much 
easier when the fonts interface lands (as discussed in a parallel 'font' 
thread).

Cheers,
Pawel




More information about the Snapcraft mailing list