I downloaded a truetype font from here: https://github.com/Templarian/MaterialDesign-Font/blob/master/MaterialDesignIconsDesktop.ttf
I tried installing it in /usr/local/share/fonts/MaterialDesignIconsDesktop/MaterialDesignIconsDesktop.ttf
.
When I run fc-cache -fvr
as root I see the file is detected:
root@localhost:/usr/local/share/fonts# fc-cache -fvr|grep MaterialDesignIconsDesktop
/usr/local/share/fonts/MaterialDesignIconsDesktop: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/MaterialDesignIconsDesktop: skipping, looped directory detected
And I see the font is listed by fc-list as root
:
root@localhost:/usr/local/share/fonts# fc-list|grep MaterialDesignIconsDesktop
/usr/local/share/fonts/MaterialDesignIconsDesktop/MaterialDesignIconsDesktop.ttf: Material Design Icons Desktop:style=Regular
However when I exit from my root login back into my normal account and run the same commands, the font is detected by fc-cache
, but isn't picked up by fc-list
:
% fc-cache -fvr |grep 'MaterialDesignIconsDesktop'
Unable to revert mtime: /usr/local/share/fonts/MaterialDesignIconsDesktop
/usr/local/share/fonts/MaterialDesignIconsDesktop: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/MaterialDesignIconsDesktop: skipping, looped directory detected
% fc-list -v|grep MaterialDesignIconsDesktop
%
I tried putting the TTF file in /usr/share/fonts/MaterialDesignIconsDesktop/
as well as ~/.local/share/fonts/MaterialDesignIconsDesktop/
with the same result.
I also made sure the font dir (a+rx) and file (a+r) are globally readable.
I have similar problems with a couple of other fonts, but this one is representative. I should add that there were some other fonts I installed without problem too - so it's not a blanket issue.
I'm running Ubuntu 22.10.
UPDATE
Seems to be something specific to my user (non-root) account. I created another non-root account on the same laptop, and when I login there, the font is being picked up just fine.
But I don't really want to migrate to a new account just for the sake of a font - especially if I end up simply reproducing the same problem once I finish the migration...