Ciprian Popovici
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
On Sun, 3 Apr 2005 20:27:56 -0400 Ambrose Li <acli@ada.dhs.org> wrote:> You can run fc-list and check if the fonts in those directories are > listed. (Note that the list is not sorted.)Can fc-list also show from what dir/file is a particular font coming from? If not, IMO it would be a quite useful feature. -- Ciprian Popovici
Paul Smith
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
On Apr 3, 2005 11:46 PM, Ambrose Li <acli@ada.dhs.org> wrote:> > Is it possible to make fontconfig aware of the fonts in the following > > directories? > > > > /usr/share/texmf/fonts/type1/public/cm-super/ > > /usr/share/texmf/fonts/afm/public/cm-super/ > > just edit /etc/fonts/local.conf and add more directories. If you > do not already have a local.conf file, the new file should look > like this: > > <?xml version="1.0"?> > <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> > <!-- ~/.fonts.conf for per-user font configuration --> > <fontconfig> > <dir>some-directory</dir> > <dir>another-directory</dir> > <dir>more directories</dir> > <dir>~/.fonts</dir> > </fontconfig> > > When I first did this, you need to also copy the directories > that are in /etc/fonts/fonts.conf (or else those directories > won''t be considered). I don''t know if this is still the case.Thanks, Ambrose. My /etc/fonts/local.conf file is: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts/local.conf file for local customizations --> <fontconfig> <!-- Enable sub-pixel rendering <match target="font"> <test qual="all" name="rgba"> <const>unknown</const> </test> <edit name="rgba" mode="assign"><const>rgb</const></edit> </match> --> </fontconfig> It does not look like yours. Is this normal? Paul
Paul Smith
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
On Apr 4, 2005 12:02 AM, Ambrose Li <acli@ada.dhs.org> wrote:> Yes, this is normal. Actually my fonts.conf file is much longer too. > You just insert the <dir>...</dir> lines before the "</fontconfig>" > line (you might need to copy the lines from /etc/fonts/fonts.conf > before adding your new directories); you also need to run fc-cache > after editing the file.Done, Ambrose. Thanks! How can I now be sure that fontconfig is in fact aware of the fonts in the added directories? Regards, Paul
Keith Packard
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
Note to both Ambrose Li and Paul Smith -- the preferred mechanism for adding local customizations is now to simply add a configuration file in /etc/font/conf.d which begins with a number. local.conf will still get read, but it''s easier to keep your customizations in place if they''re in a separate file. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050403/643a220c/attachment.pgp
Ambrose Li
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
Hi On Sun, Apr 03, 2005 at 11:39:38PM +0100, Paul Smith wrote:> Dear All > > Is it possible to make fontconfig aware of the fonts in the following > directories? > > /usr/share/texmf/fonts/type1/public/cm-super/ > /usr/share/texmf/fonts/afm/public/cm-super/just edit /etc/fonts/local.conf and add more directories. If you do not already have a local.conf file, the new file should look like this: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- ~/.fonts.conf for per-user font configuration --> <fontconfig> <dir>some-directory</dir> <dir>another-directory</dir> <dir>more directories</dir> <dir>~/.fonts</dir> </fontconfig> When I first did this, you need to also copy the directories that are in /etc/fonts/fonts.conf (or else those directories won''t be considered). I don''t know if this is still the case.> > Thanks in advance, > > PaulRegards, Ambrose
Ambrose Li
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
Hi, On Sun, Apr 03, 2005 at 11:57:16PM +0100, Paul Smith wrote:> Thanks, Ambrose. My /etc/fonts/local.conf file is: > > <?xml version="1.0"?> > <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> > <!-- /etc/fonts/local.conf file for local customizations --> > <fontconfig> > <!-- > Enable sub-pixel rendering > <match target="font"> > <test qual="all" name="rgba"> > <const>unknown</const> > </test> > <edit name="rgba" mode="assign"><const>rgb</const></edit> > </match> > --> > </fontconfig> > > It does not look like yours. Is this normal?Yes, this is normal. Actually my fonts.conf file is much longer too. You just insert the <dir>...</dir> lines before the "</fontconfig>" line (you might need to copy the lines from /etc/fonts/fonts.conf before adding your new directories); you also need to run fc-cache after editing the file. (Don''t add the <dir> lines between the <!-- and the -->.) Regards, Ambrose
Ambrose Li
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
Hi On Mon, Apr 04, 2005 at 12:12:31AM +0100, Paul Smith wrote:> > How can I now be sure that fontconfig is in fact aware of the fonts in > the added directories?You can run fc-list and check if the fonts in those directories are listed. (Note that the list is not sorted.)> Regards, > > PaulRegards, Ambrose
Ambrose Li
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
Hi, On Sun, Apr 03, 2005 at 09:38:19PM -0700, Keith Packard wrote:> > local.conf will still get read, but it''s easier to keep your > customizations in place if they''re in a separate file.Thanks for the note. Sorry for not having followed fontconfig changes very closely. On the other hand, I don''t find keeping customizations in many files easier: With a single file, I can track my changes with RCS, but with several files, I have to worry about many files and also how to represent the fact of "this particular bit of configuration did not exist before a certain time". (Since I was not aware of this functionality in fontconfig, I am not talking about fontconfig, but rather other subsystems which have moved to multiple file configurations, like cron, inetd, etc.) IMHO, the "many files" approach might be very safe for automatic packaging systems, but I don''t find them very helpful for local customizations. Just my two cents.> -keithRegards, Ambrose
Paul Smith
2005-Nov-21 08:51 UTC
[Fontconfig] Making fontconfig aware of the fonts in certain directories
Dear All Is it possible to make fontconfig aware of the fonts in the following directories? /usr/share/texmf/fonts/type1/public/cm-super/ /usr/share/texmf/fonts/afm/public/cm-super/ Thanks in advance, Paul