From def1d00036a4e828382027292a167203c6c7a0b4 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 31 Jan 2019 07:52:09 +0000 Subject: [PATCH] Add reset-dirs element This element removes all of fonts directories where added by dir elements. it is useful to override fonts dirs from system to their own dirs only. --- conf.d/05-reset-dirs-sample.conf | 9 +++++++++ conf.d/Makefile.am | 1 + doc/fontconfig-user.sgml | 4 ++++ fonts.dtd | 6 ++++++ src/fccfg.c | 6 ++++++ src/fcint.h | 6 ++++++ src/fcstr.c | 16 ++++++++++++++++ src/fcxml.c | 15 +++++++++++++++ 8 files changed, 63 insertions(+) create mode 100644 conf.d/05-reset-dirs-sample.conf diff --git a/conf.d/05-reset-dirs-sample.conf b/conf.d/05-reset-dirs-sample.conf new file mode 100644 index 0000000..80bb6fb --- /dev/null +++ b/conf.d/05-reset-dirs-sample.conf @@ -0,0 +1,9 @@ + + + + Re-define fonts dirs sample + + + fonts + + diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am index ff03fb2..d0f3f26 100644 --- a/conf.d/Makefile.am +++ b/conf.d/Makefile.am @@ -52,6 +52,7 @@ config_DATA = $(DOC_FILES) templatedir = $(TEMPLATEDIR) template_DATA = \ + 05-reset-dirs-sample.conf \ 10-autohint.conf \ 10-hinting-full.conf \ 10-hinting-medium.conf \ diff --git a/doc/fontconfig-user.sgml b/doc/fontconfig-user.sgml index f083394..f30b4f0 100644 --- a/doc/fontconfig-user.sgml +++ b/doc/fontconfig-user.sgml @@ -358,6 +358,10 @@ as the path 'as-path' in cached information. This is useful if the directory name is an alias (via a bind mount or symlink) to another directory in the system for which cached font information is likely to exist. + + <literal><reset-dirs /></literal> +This element removes all of fonts directories where added by <dir> elements. +This is useful to override fonts directories from system to own fonts directories only. <literal><rescan></literal> The <rescan> element holds an <int> element which indicates the default diff --git a/fonts.dtd b/fonts.dtd index d0e1700..f8c9f2c 100644 --- a/fonts.dtd +++ b/fonts.dtd @@ -8,6 +8,7 @@ include | match | remap-dir | + reset-dirs | selectfont)* > + +