Re: Rejecting and accepting fonts

Akira TAGOH <[email protected]>
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <CACT-Cx0UBNTeJ-rOk2+GKE+-D9KO3Knrzh9S9MBpTyjB4PR0qA@mail.gmail.com>
On Tue, Nov 14, 2017 at 7:59 PM, Donn Ingle <[email protected]> wrote:
> Questions:
> 1. Is this a valid strategy to reject/accept, or is it a bug in fontconfig?
> (Allowing ln -s paths through a reject glob. It seems like it's not a bug,
> but I don't know if it's intentional.)
>
> 2. Is there a better/safer way to do this all in the XML files?

Are you asking if there are any way to do something in XML instead of "ln -s"?
Here is to allow only /usr/share/fonts/dejavu/DejaVuSans.ttf and
reject all of fonts under /usr/share/fonts.

<fontconfig>
  <selectfont>
    <rejectfont><glob>/usr/share/fonts/*</glob></rejectfont>
    <acceptfont>
      <glob>/usr/share/fonts/dejavu</glob>
      <glob>/usr/share/fonts/dejavu/DejaVuSans.ttf</glob>
    </acceptfont>
  </selectfont>
</fontconfig>

Adding a directory too is the trick. fontconfig checks a directory
first then filenames in it so just adding a filename without dir
fails.

HTH,
-- 
Akira TAGOH
_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.