You are not logged in.
Hi all,
I'm using XeLaTeX which is based on fontconfig. The problem is about
fc-cacheand
fc-list. The problem is the following:
1) I noticed that in the folder
/usr/share/texmf-dist/fonts/opentype/public/lmI have a lot of
.otf fonts.
2) I know that its name is
Latin Modern Roman, but doing
fc-list | grep Latin I cannot find anything;
3) So I update cache doing
fc-cache -fv /usr/share/texmf-dist/fonts/opentype/public/lm, here it's the result
/usr/share/texmf-dist/fonts/opentype/public/lm: caching, new cache contents: 72 fonts, 0 dirs
/var/cache/fontconfig: cleaning cache directory
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded4) however doing again
fc-list | grep LatinI don't get anything. What is the problem? How can I have that font in my cache?
Last edited by PogMat (2017-04-03 12:03:38)
Offline
What does this have to do with latex? Are you using the fontspec package? Generally one would use fontspec in order to use fonts *other* than latex's. If you want to use Latin Modern Roman there's no need for fontspec.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yes I'm using XeLaTeX and fontspec. I use Latin Modern Roman as an example even if it's the default fonts. The very problem is that I have a lot of otf font in my pc, but, even after fc-caching the scecific directories I cannot find any otf font in fc-cache, and so I cannot use any non-Latin Modern Roman otf font in XeLaTeX. What is the problem with my caching?
Last edited by PogMat (2017-04-01 13:01:54)
Offline
/root/.cache/fontconfig: not cleaning non-existent cache directory
Are you generally running as root?
Did you consider to add /usr/share/texmf-dist/fonts/ to the fontconfig dirs?
Offline
At the end I simply created a file
/etc/fonts/conf.d/09-texlive.confwith
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/usr/share/texmf-dist/fonts/opentype</dir>
</fontconfig>I thought that it wasn't needed since I had specified the directory to scan to fc-cache:
fc-cache -fv /usr/share/texmf-dist/fonts/opentype/public/lmHowever now it works,
Thanks
Offline
Nope, the cache is "nice to have" - you still need to specify where to look for fonts.
Offline