Bug 61 - Mechanism to over-ride directories, or at least ignore directories?
Summary: Mechanism to over-ride directories, or at least ignore directories?
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.1
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Keith Packard
QA Contact:
Depends on:
Reported: 2003-04-16 21:14 UTC by David B Harris
Modified: 2007-10-25 01:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description David B Harris 2003-04-16 21:14:47 UTC
Hey ho :) Wishlist bug here. I only set its severity to "Normal" because,
currently, the user can override pretty much everything to their local taste,
except for this on particular area.

More specifically, one of my users (X terminal users) dislikes many truetype
fonts, and prefers standard fonts in all cases, though she can live with some
truetype fonts.

Anyways, currently mechanisms exist for her to do pretty much whatever she wants
via her ~/.fonts.conf, except tell fontconfig which font directories to look in;
<dir></dir> is additive-only.

Colin Walters suggested adding another directive, <ignoredir>. That'd solve my
problem case, but a more consistent approach would be to enclose the <dir>
structures in another tag, ie:
<searchpath><dir>/foo/bar</dir><dir>/usr/foo/bar</dir></searchpath>. That's like
all the other directives.

Thanks :)
Comment 1 Keith Packard 2003-04-17 08:28:36 UTC
I was waiting until we figured out whether a more general mechanism was needed
to solve other font banning problems (something like match/edit) that use font
patterns or perhaps just font filenames.  However, a way to erase the directory
list or ignore certain parts of the heirarchy seems like a good first step.

Perhaps just a way to ignore filenames by globbing pattern would work (*.ttf or

Comment 2 David B Harris 2003-04-17 11:31:37 UTC
Given how fonts are most often organised on-disk, I think the directory stuff
would be better. Less complex, easier to understand, fits in well with common
system administration practices, and it'd also solve my case (and any other case
I can imagine).
Comment 3 Keith Packard 2003-04-17 14:58:13 UTC
I'm thinking the file name pattern stuff is a pretty simple superset of the
directory pruning <exclude>/usr/X11R6/lib/X11/fonts/misc/*</exclude> and would 
allow you to easily eliminate bdf/pcf fonts with a single directive.

Does that make sense?
Comment 4 Keith Packard 2003-04-18 10:24:55 UTC
I've implemented a simple shell-style globbing mechanism to accept/reject
fonts based on their filename.  I'll post a description to

However, I'm going to leave this out of fontconfig 2.2 and leave it for the 2.3
Comment 5 David B Harris 2003-04-18 11:05:55 UTC
Okay, cool. Would you be willing to post the patch here? I'm perfectly willing
and capable of maintaining the patch locally (I do have use of it :), and you'll
at least get some testing. I'll also be forward-porting it as new releases are
made, and I'll be willing to post any updates here should they prove necessary.
Comment 6 Keith Packard 2003-04-18 12:17:00 UTC
I'll get the patch into the tree once I tag 2.2 and branch.
Comment 7 Daniel Stone 2007-03-26 08:21:42 UTC
reopening all RESOLVED/{LATER,REMIND} bugs.  now is later, and this is a reminder. ;)
Comment 8 Keith Packard 2007-10-25 01:53:43 UTC
This was fixed years ago for fontconfig 2.3

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.