Score:0

Why Do Some Fonts Only Appear To Load For Some Users And Not Others

in flag

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...

David avatar
cn flag
To be clear you were logged in as root when you added the fonts?
Score:0
in flag

Ok so I went into Font Manager (font-manager) and noticed that the above font was listed but it was "unchecked". And as soon as I marked it "checked' the font appeared in the fc-list output.

I have no idea why I had to do that specifically for that font but not others. Perhaps I accidentally "unchecked" it previously when using Font Manager to browse the fonts.

In any case, this fixed the problem.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.