Discussion:
[MPlayer-users] Acceptable way to disable fontconfig caching...
Josh
2016-01-08 01:09:05 UTC
Permalink
I've been figuring some way to deal with fontconfig's annoying cache, a
final nail in the coffin being that when updating the fontconfig library
older caches had to be cleaned out or else it would keep scanning every
single time MPlayer is run.

Compiling without fontconfig, or using -nofontconfig, works fine with
embedded fonts but then it wouldn't be possible to specify system fonts,
in that case MPlayer can only use subfont.ttf.

It seems removing '<dir>WINDOWSFONTDIR</dir>' from fonts.conf removes
the scanning and caching, and still retains the ability to use system
fonts. I tested with an external .ass changing it to numerous different
system fonts with and without '<dir>WINDOWSFONTDIR</dir>' (and removing
caches between tests of course) and there was no difference except an
ominous warning message:



Fontconfig failed to select a font. Trying without fontconfig...
Fontconfig failed to select a font. Trying without fontconfig...

[ass] fontselect: (Wingdings, 400, 0) -> Wingdings-Regular, 0,
Wingdings-Regular



I am using the latest libass from git. I'm thinking of pushing this
change to my builds and even comment out the 'Fontconfig failed'
message, if there isn't anything I overlooked. Thoughts?
wm4
2016-01-08 07:55:47 UTC
Permalink
On Thu, 7 Jan 2016 20:09:05 -0500
Post by Josh
I've been figuring some way to deal with fontconfig's annoying cache, a
final nail in the coffin being that when updating the fontconfig library
older caches had to be cleaned out or else it would keep scanning every
single time MPlayer is run.
Compiling without fontconfig, or using -nofontconfig, works fine with
embedded fonts but then it wouldn't be possible to specify system fonts,
in that case MPlayer can only use subfont.ttf.
It seems removing '<dir>WINDOWSFONTDIR</dir>' from fonts.conf removes
the scanning and caching, and still retains the ability to use system
fonts. I tested with an external .ass changing it to numerous different
system fonts with and without '<dir>WINDOWSFONTDIR</dir>' (and removing
caches between tests of course) and there was no difference except an
Fontconfig failed to select a font. Trying without fontconfig...
Fontconfig failed to select a font. Trying without fontconfig...
[ass] fontselect: (Wingdings, 400, 0) -> Wingdings-Regular, 0,
Wingdings-Regular
I am using the latest libass from git. I'm thinking of pushing this
change to my builds and even comment out the 'Fontconfig failed'
message, if there isn't anything I overlooked. Thoughts?
Note that libass can run without fontconfig now (and should be doing
that by default). But MPlayer itself has a dependency on fontconfig
AFAIK.
Josh
2016-01-10 07:43:54 UTC
Permalink
Post by wm4
On Thu, 7 Jan 2016 20:09:05 -0500
Post by Josh
I've been figuring some way to deal with fontconfig's annoying cache, a
final nail in the coffin being that when updating the fontconfig library
older caches had to be cleaned out or else it would keep scanning every
single time MPlayer is run.
Compiling without fontconfig, or using -nofontconfig, works fine with
embedded fonts but then it wouldn't be possible to specify system fonts,
in that case MPlayer can only use subfont.ttf.
It seems removing '<dir>WINDOWSFONTDIR</dir>' from fonts.conf removes
the scanning and caching, and still retains the ability to use system
fonts. I tested with an external .ass changing it to numerous different
system fonts with and without '<dir>WINDOWSFONTDIR</dir>' (and removing
caches between tests of course) and there was no difference except an
Fontconfig failed to select a font. Trying without fontconfig...
Fontconfig failed to select a font. Trying without fontconfig...
[ass] fontselect: (Wingdings, 400, 0) -> Wingdings-Regular, 0,
Wingdings-Regular
I am using the latest libass from git. I'm thinking of pushing this
change to my builds and even comment out the 'Fontconfig failed'
message, if there isn't anything I overlooked. Thoughts?
Note that libass can run without fontconfig now (and should be doing
that by default). But MPlayer itself has a dependency on fontconfig
AFAIK.
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Well hopefully it won't require fontconfig at all in the future.

Loading...