fc-list "DejaVu Serif"
/usr/share/fonts/TTF/DejaVuSerifCondensed.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
/usr/local/texlive/current/texmf-dist/fonts/truetype/public/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book
/usr/local/texlive/current/texmf-dist/fonts/truetype/public/dejavu/DejaVuSerif-Italic.ttf: DejaVu Serif:style=Italic
/usr/local/texlive/current/texmf-dist/fonts/truetype/public/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/TTF/DejaVuSerifCondensed-Bold.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/TTF/DejaVuSerif.ttf: DejaVu Serif:style=Book
/usr/local/texlive/current/texmf-dist/fonts/truetype/public/dejavu/DejaVuSerifCondensed.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
/usr/local/texlive/current/texmf-dist/fonts/truetype/public/dejavu/DejaVuSerif-BoldItalic.ttf: DejaVu Serif:style=Bold Italic
/usr/share/fonts/TTF/DejaVuSerifCondensed-Italic.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Italic,Italic
/usr/share/fonts/TTF/DejaVuSerif-BoldItalic.ttf: DejaVu Serif:style=Bold Italic
/usr/share/fonts/TTF/DejaVuSerifCondensed-BoldItalic.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
/usr/local/texlive/current/texmf-dist/fonts/truetype/public/dejavu/DejaVuSerifCondensed-Bold.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
/usr/share/fonts/TTF/DejaVuSerif-Italic.ttf: DejaVu Serif:style=Italic
/usr/local/texlive/current/texmf-dist/fonts/truetype/public/dejavu/DejaVuSerifCondensed-BoldItalic.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
I'm guessing it is not a good thing to have multiple instances of fonts on the system.
Anyway, I'll have a go at clearing things up, as you suggested, and report back. Thanks!
EDIT: I will report back but I'm still working on it... (Mostly because ugly fonts keep getting pushed down my priority list...)
]]>fc-list "DejaVu Serif"
?
The first thing I'd do: clean your generic fontconfig directory, i.e. /etc/fonts/conf.d, leaving there only what's really necessary (depending on the complexity of your desktop, this means as little as 49-sansserif.conf, 50-user.conf, 51-local.conf and 52-infinality.conf). When you have installed freetype2 with Infinality patches and Infinality fontconfig files, than most of the standard fontconfig settings will be either duplicated by Infinality, or mutually exclusive. When you're done with it, go through the Infinality fontconfig files and check if they reflect the state of your font stock. I believe there must be some sort of inconsistency in your font configuration, hence the confusion above. Restart your X and see if what you see is a bit closer to what you'd like to get.
]]>fc-match "Times New Roman"
<lots of infinality errors>
times.ttf: "DejaVu Serif" "Normal"
fc-match "Times"
<errors>
DejaVuSerif.ttf: "DejaVu Serif" "Book"
What?!
]]>@cfr,
I do not have infinality installed.
If infinality settings are being processed after 30-urw-aliases, infinality's settings will override. The last file processed is the file that counts.
And the higher number file is processed first, right? So 52-infinality.conf should be processed before 30-urw-aliases.conf and the latter should override the former but somehow does not?
What the file actually does is include infinality/infinality.conf and, hence, a bunch of files in infinality/conf.d which have a range of different numbers. I've been assuming these are all read before fontconfig proceeds to lower numbered fines in /etc/fonts/conf.d but maybe I shouldn't be making that assumption...
XML is hard for humans to parse and no one has ever made a noob-friendly guide for font configuration. I could sure use that guide. We all pick up pieces of understanding here and there, solve our immediate problem, and then pray we never have to deal with fontconfig again.
There's something about fonts... or is it the combination of fonts and Linux? Fonts in TeX are at least as weird though in different ways (of course). Mac fonts are difficult to even copy correctly from one place to another. And...
]]>I could be mistaken, but I think 30-urw-aliases merely says to consider URW Palladio when matching, but it does not force the match. The wiki has a section on replacing a font, https://wiki.archlinux.org/index.php/Fo … lace_fonts.
Here's the excerpt from my ~/.config//fontconfig/fonts.conf where I do force substitutions for some purchased fonts. It's different from the wiki.
<!-- Replace bitmap Helvetica -->
<match target="pattern">
<test name="family">
<string>Helvetica</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Helvetica LT Std</string>
</edit>
</match>
<!-- Replace URW Palladio L with a better Palatino -->
<match target="pattern">
<test name="family">
<string>Palatino</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Palatino Linotype</string>
</edit>
</match>
XML is hard for humans to parse and no one has ever made a noob-friendly guide for font configuration. I could sure use that guide. We all pick up pieces of understanding here and there, solve our immediate problem, and then pray we never have to deal with fontconfig again.
]]>if using conky-colors, recreate your config file after updating.
]]>In the case of a serif font, like Garamond, is the problem that it doesn't know Garamond is serif or is it just not possible for it to substitute a different font for serifs than san serifs?
I'm still getting reams of errors about infinality, though, so I don't know if I would get different results if that were updated for the new packages.
Have I understood the infinality patch set correctly? As far as I can tell, in addition to the tweaks it applies re. hinting, sub-pixel rendering etc., it also imposes a uniform set of fonts. So if, for example, I am using the infinality style, it will replace Liberation Sans Mono with Courier, Helvetica with Arial and Times with Times New Roman even if I have Liberation Sans, Courier and Times installed?
And if I then switch the style to linux, it will replace Arial with Liberation Sans, Courier with Liberation Mono, and both Times and Times New Roman with DejaVu Serif even if I have Arial, Courier, Times and Times New Roman installed?
When I installed infinality, it honestly didn't occur to me that it might do this. I think I just assumed it would use the various different choices for cases where the font requested was not available on the system.
Is this a peculiarity of infinality's patches or will any fontconfig setup essentially do the same thing? I guess I'm not clear why it isn't better to use a font which is an exact match when that is available and to fall back to substitutes only when necessary. Or am I missing something really basic?
In the case of a font like Palatino which one of my colleagues has taken a fancy to on OS X, 30-urw-aliases includes:
<alias binding="same">
<family>Palatino</family>
<accept><family>URW Palladio L</family></accept>
</alias>
Yet fc-match shows that Palatino will be replaced by Liberation Sans! (Rather than Arial because I fiddled with infinality's settings above.) But 30 should be processed before infinality's settings, right? And gsfonts provides the standard URW fonts specified in 30-urw-aliases.conf. So is this because fontconfig cannot use type1 fonts? But then what purpose does the 30-urw-aliases.conf file serve?
]]>$ fc-match Calibri
DejaVuSans.ttf: "DejaVu Sans" "Book"
$ fc-match "Any Font"
DejaVuSans.ttf: "DejaVu Sans" "Book"
My default san-serif font is "DejaVu Sans" and I use '49-sansserif.conf' which sets any otherwise unmatchable font to "sans-serif".
OpenOffice and LibreOffice have their own ways with fonts. I think the oddness they sometimes exhibit may be related to their being cross-platform. It's probably difficult to match fonts and font-metrics across the different operating systems.
@32reg, I just tested OpenLogos from the AUR. Fontforge can't display any glyphs from the TTF file. An older version, downloaded from dafonts.com, does display glyphs (and uses the old Arch logo). Both fonts you enquired about are limited user base, novelty fonts; I wouldn't expect updates to them.
]]>What comes really handy is the possibility to prioritize fonts with certain features. For instance, you have several fonts capable of displaying Chinese characters and you like one or two of them best, so you can use a list to help fontconfig choose just those:
~ $ cat 30-non-latin.conf
<match target="font" >
<alias>
<family>serif</family>
<prefer>
<family>Kai</family>
<family>STKaiti</family>
<family>LiSong Pro</family>
. . .
</prefer>
</alias>
</match>
</fontconfig>
*) Or will use the font only when the limitation applies -- see thisoldman's clarification of rules 38 vs 39. This can, under certain conditions, let you use a font which, for instance, provides characters for one language, but for others should be replaced by a different one. See fontconfig documentation (man fonts-conf) for a complete list of properties that may be used this way.
]]>Do substitution rules only apply if the target font is not available?
So in the example of Calibri/Helvetica/Droid, if Calibri were available, would fontconfig stick with Calibri or would it substitute Droid/Helvetica?
If neither Droid nor Calibri was available, would fontconfig use Helvetica even if the 38- conf link existed?
]]>I think that's the correct filename. I'm at work and can't double-check. But the user's configuration, in his home directory, is read last, so any configurations written there will override the system settings.
]]>The wiki page wording may be confusing. The rules in the lower number files take priority over the rules in the higher number files.
This does mean the higher number is processed first. But the last file to be processed is the ruling file. I have two files in /etc/fonts/fonts.conf.d:
38-no-calibri.conf, substitutes 'Droid Serif' for Calibri
39-no-calibri.conf, substitutes a Helvetica font for Calibri.$ fc-cache -f $ fc-match Calibri DroidSerif-Regular.ttf: "Droid Serif" "Regular" $ sudo rm -v 38-no-calibri.conf removed ‘38-no-calibri.conf' $ fc-cache -f $ fc-match Calibri helveticaltstd-roman.otf: "Helvetica LT Std" "Roman"
When the '38' file is present, it overrules the '39' file.
Edit to fix missing char from a copy-paste action.
I'm still wondering.
My ~/.fonts.conf(included by 50-user.conf) always override 10-whatever.conf.
Sort of autohint, hintstyle, hinting...