You are not logged in.

#1 2017-04-01 12:41:17

PogMat
Member
Registered: 2013-09-19
Posts: 42

[SOLVED]fc-cache and fc-list problem

Hi all,
I'm using XeLaTeX which is based on fontconfig. The problem is about

fc-cache

and

fc-list

. The problem is the following:

1) I noticed that in the folder

/usr/share/texmf-dist/fonts/opentype/public/lm

I 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: succeeded

4) however doing again

fc-list | grep Latin

I 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

#2 2017-04-01 12:48:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [SOLVED]fc-cache and fc-list problem

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

#3 2017-04-01 13:01:24

PogMat
Member
Registered: 2013-09-19
Posts: 42

Re: [SOLVED]fc-cache and fc-list problem

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

#4 2017-04-01 14:58:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,493

Re: [SOLVED]fc-cache and fc-list problem

/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

#5 2017-04-03 12:03:13

PogMat
Member
Registered: 2013-09-19
Posts: 42

Re: [SOLVED]fc-cache and fc-list problem

At the end I simply created a file

/etc/fonts/conf.d/09-texlive.conf

with

<?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/lm

However now it works,
Thanks

Offline

#6 2017-04-03 14:20:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,493

Re: [SOLVED]fc-cache and fc-list problem

Nope, the cache is "nice to have" - you still need to specify where to look for fonts.

Offline

Board footer

Powered by FluxBB