• Tom Anderson's avatar
    Return canonicalized paths from FcConfigRealFilename · d1f48f11
    Tom Anderson authored
    FcConfigRealFilename() follows symlinks, but the link may be relative to the
    directory containing the link.  For example, on my system, I have this file:
    
    /etc/fonts/conf.d/99-language-selector-zh.conf ->
        ../conf.avail/99-language-selector-zh.conf
    
    Since /etc/fonts/conf.d is probably not in PATH, open()ing the file would fail.
    This change makes FcConfigRealFilename() return the canonicalized filename
    instead.  So for the example above, it would return:
    
    /etc/fonts/conf.avail/99-language-selector-zh.conf
    
    This was causing bad font rendering in Chromium [1] after the regression I
    introduced in 7ad010e8.
    
    [1] https://bugs.chromium.org/p/chromium/issues/detail?id=857511
    d1f48f11
fcint.h 33.5 KB