[Fontconfig-bugs] [Bug 106618] New: Relocated caches not quite working

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 22 13:47:44 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=106618

            Bug ID: 106618
           Summary: Relocated caches not quite working
           Product: fontconfig
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: library
          Assignee: fontconfig-bugs at lists.freedesktop.org
          Reporter: alexl at redhat.com
        QA Contact: freedesktop at behdad.org

Now that F28 and flatpak are starting to ship, we're finding issues with them.
For example, the libreoffice flatpak can't find any fonts.

The reason for this is that libreoffice gets FC_FILE from the patterns, and
this gets the host-side path (/usr/share/fonts/...) instead of the rewritten
host-side path (/run/host/fonts/).

Its a bit weird though, because fc-list prints the correct path. In fact, if
you run:
 FC_DEBUG=8191 fc-list -v 
In the sandbox you can see that the first time (FC_DEBUG) the pattern is
printed its in /usr, but the final result is in /run/host/fonts.

I took the LO code and made a minimal example of printing the wrong (/usr)
thing:

#include <stdio.h>
#include <string.h>
#include <fontconfig/fontconfig.h>

int
main(int argc, char *argv[])
{
  FcFontSet* fs = FcConfigGetFonts( FcConfigGetCurrent(), FcSetSystem );

  if (fs == NULL)
    return 1;

  for (int i = 0; i < fs->nfont; ++i)
    {
      FcPattern* p = fs->fonts[i];
      FcChar8* file = NULL;
      FcResult eFileRes  = FcPatternGetString(p, FC_FILE, 0, &file);

      FcPatternPrint (p);
      if (eFileRes == FcResultMatch)
        printf ("FC_FILE: %s\n", file);
    }

  return 0;
}

When is the rewriting happening? I think it needs to happen earlier.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20180522/b78ccb22/attachment.html>


More information about the Fontconfig-bugs mailing list