Donn Ingle
2007-Apr-24 01:30 UTC
[Fontconfig] About removing a single font from a Gnu/Linux system
Hello, I am posting from knode via Gmane, I hope this gets to the list. I am the (slow) developer of Fonty Python and I am trying to get two things done that, so far, I have not had any luck with. I hope someone on this list can point me in the right direction. Situation: O/S - Kubuntu Dapper. Number of fonts (estimate) visible to fontconfig - 600. When I want to use an app like Inkscape or Gimp, the number of fonts that appear in the choosers is overwhelming. I want to learn how to cut them down - how to "uninstall" or "remove" them without actually removing the font files from the drive. 1. How can I remove a single font that is listed? Let''s pick on URWGothicL-Book - so that it does not appear in Inkscape or Gimp. 2. How can I then, within ~/.fonts, install URWGothicL-Book again? I chose it because it''s a Type1 font. I am currently trying to include those in Fonty Python. (I want a way that I can make link(s) to the font file(s) (pfg, afm, pfm) within ~/.fonts such that the font is available in Inkscape (and other choosers -- without the need for root login/su/sudo). If there is another technique, bring it on. I gotta grok it before I can Python it. Aim: I want to create a "font zapper" of some kind so that people who want to manage their fonts can clear-up the chaos of system-wide fonts. I am picturing a list of check-boxes and those that get ticked are visible to fontconfig (listed in a font.cache-1 file, I guess) and those that are not are *not* deleted, just sitting unnoticed by fontconfig. This way, if a vital system font has been ''cleared'' by mistake, the user can pretty quickly re-tick it. If anyone can help me out that would be great. Donn.
Donn Ingle
2007-Apr-25 06:36 UTC
[Fontconfig] Re: About removing a single font from a Gnu/Linux system
In answer to myself, after a few hours of testing today: 1. The only way to remove a font from fc is to MOVE the actual fonts file(s) to another (neutral) directory someplace. 2. It DOES NOT matter whether that font file(s) is references in any fonts.cache-1 file, if it is physically gone it is ignored by fc. If there are links to the font that are living in some other folder, there is some confusion about the situation. If the original font is moved, then all links to it are broken and so the font *should* still be ''gone'', but it *may* still show-up in choosers and fc-list. (Still testing this.) FWIW, Donn.