Fontconfig - Truetype/Droid Font issue with Stretch [Solved]

Help with issues regarding installation of Debian

Fontconfig - Truetype/Droid Font issue with Stretch [Solved]

Postby Wroxter » 2017-07-22 16:27

I have been running a regularly updated Stretch for some time (around the time Jessie went stable?). At one time I appear to have had four (or more) separate Droid fonts installed, but some time back an upgrade apparently replaced these with one file. /usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf

Mythtv did have links pointing at those original four fonts and started nagging me about this some time ago. I originally did not notice other negative effects, but recently I have found this error seems to preceed issues I am exploring with display of subtitles/closed captions.

The change may have resulted from a bug fix? ... bug=762296 which resulted from duplicate font names.
(Also referred also in!topic ... aQqfLBTtsk when this font was moved out of the normal directory structure that fontconfig scans.)

This new font package apparently contains all the needed Droid fonts (sans,bold,small,etc and the other language variants), but these do not seem to be recognized with fontconfig, which then is substituting Dejavu.

I tried reinstalling that droid package, a new /etc/fonts/local.conf file to include the directory in which it has been installed as well as in a weak moment changing that font file extension to ttc.

Web search results are conflicting: that the first font that matches any rule is used and overrides the local config and vice versa...

Am I missing part of the fontconfig configuration or is there some way of fixing this, perhaps using fontconfig to substitute another font with more options?

If this is a bug, where would the best place to file the report or



Code: Select all
$ fc-match 'Droid Sans'
DejaVuSans.ttf: "DejaVu Sans" "Book"

Code: Select all
~$ FC_DEBUG=1 fc-match 'Droid Sans'
Best score 0 0 0 0 0 0 1000 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2.14733e+12
Pattern has 23 elts (size 23)
        family: "DejaVu Sans"(w)
        familylang: "en"(w)
        style: "Book"(w)
        stylelang: "en"(w)
        fullname: "DejaVu Sans"(w)
        fullnamelang: "en"(w)

Code: Select all
 fc-cache -f -v
/usr/share/fonts/truetype/dejavu: caching, new cache contents: 22 fonts, 0 dirs
/usr/share/fonts/truetype/droid: caching, new cache contents: 1 fonts, 0 dirs

Code: Select all
$ fc-list | grep -i droid
/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf: Droid Sans Fallback:style=Regular

Code: Select all
$ cat /etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
Draft rule to  accept Droid replacing it with 'DroidSansFallbackFull'
to stop error with mythtv (repeated many times for bold,.etc.) 
E  MythFontProperties: Failed to load 'Droid Sans', got 'DejaVu Sans' instead
Currently this substitution/conf file is not working although
fc-cache does not complain - it did on earlier versions.
        <match target="pattern">
                <test qual="any" name="family">
                <edit name="family" mode="assign" binding="strong">
Last edited by Wroxter on 2017-07-24 18:48, edited 1 time in total.
Posts: 10
Joined: 2011-02-21 17:43

Re: Fontconfig - Truetype/Droid Font issue with Stretch

Postby Caitlin » 2017-07-23 01:24


I installed Droid Sans Mono directly, bypassing the Fallback package. I had no problems with matching rules or anything. Details here: viewtopic.php?f=17&t=133970 .

Posts: 236
Joined: 2012-05-24 07:32

Re: Fontconfig - Truetype/Droid Font issue with Stretch

Postby Wroxter » 2017-07-24 18:47

Thanks Caitlan, I had seen your posting and it might fit the need, but I continued without resorting to downloading an 'unknown' package. ... -malicious

I do already have a ~5Mb file on my Debian install that the Debian developers chose with knowledge of what was actually in the file. Given the need or deperation I might consider downloading from|Droid+Sans+Mono|Droid+Serif
in place of the link you give.

The same-named fonts (all with Adobe licenses dated 2004) are on both sites, but the files differ in size. While the Droid Sans Mono is only 2K larger than that on Google's site the other two in your link are ~4x the size. There may well be a legitimate explanation, but there could also be another.

For anyone with the same problem of fontconfig/the system giving out Dejavu fonts in place of Droid or other fonts, the fonts.config file needed (in my current Stretch-started out as testing) resides in
~/.config/fontconfig and this does take precidence over the system defaults.

I also created a symbolic link from the droidsansfallbackfull.conf in /etc/fonts/conf.available in /etc/fonts/conf.d

I understand from talking with others that fontconfig has some changes coming in the new testing so changes may be required in the future.

The best links describing how to change the fall-back that I have found are: ... onts-linux

which solved the problem at hand, and ... ack-at-me/

Which is likely to solve the issue I am really trying to fix.
Posts: 10
Joined: 2011-02-21 17:43

Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests