From c5ab59762c4ad5def68436d55937a2bd558d5c99 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 19 Jun 2007 10:38:02 -0400 Subject: Add a new 'catalogue' FPE, which takes font paths from symlinks in a dir. This patch adds a new FPE type, which will match font path elements of the form catalogue: The dir specified after the catalogue: prefix will be scanned for symlinks and each symlink destination will be added as a local fontfile FPE. The symlink can be suffixed by attributes, such as 'unscaled', which will be passed through to the underlying fontfile FPE. Except the new attribute 'pri' which will be used for ordering the fontfile FPEs. An example configuration: 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi ghostscript:pri=60 -> /usr/share/fonts/default/ghostscript misc:unscaled:pri=10 -> /usr/share/X11/fonts/misc type1:pri=40 -> /usr/share/X11/fonts/Type1 type1:pri=50 -> /usr/share/fonts/default/Type1 will add /usr/share/X11/fonts/misc as the first FPE with the attribute 'unscaled', second FPE will be /usr/share/X11/fonts/75dpi, also with the attribute unscaled etc. This is functionally equivalent to setting the following font path: /usr/share/X11/fonts/misc:unscaled, /usr/share/X11/fonts/75dpi:unscaled, /usr/share/X11/fonts/Type1, /usr/share/fonts/default/Type1, /usr/share/fonts/default/ghostscript The motivation is to let font packages add a symlink to the new font directory they provide instead of rewriting either the Xorg config file or the xfs config file. --- include/X11/fonts/fntfil.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/X11') diff --git a/include/X11/fonts/fntfil.h b/include/X11/fonts/fntfil.h index 81d2cbc..074f2d0 100644 --- a/include/X11/fonts/fntfil.h +++ b/include/X11/fonts/fntfil.h @@ -92,6 +92,9 @@ extern int FontFileOpenBitmap ( FontPathElementPtr fpe, FontPtr *pFont, extern int FontFileListFonts ( pointer client, FontPathElementPtr fpe, char *pat, int len, int max, FontNamesPtr names ); +extern int FontFileStartListFonts ( pointer client, FontPathElementPtr fpe, + char *pat, int len, int max, + pointer *privatep, int mark_aliases ); extern int FontFileStartListFontsWithInfo ( pointer client, FontPathElementPtr fpe, char *pat, int len, int max, @@ -111,6 +114,7 @@ extern int FontFileListNextFontOrAlias ( pointer client, char **resolvedp, int *resolvedlenp, pointer private ); extern void FontFileRegisterLocalFpeFunctions ( void ); +extern void CatalogueRegisterLocalFpeFunctions ( void ); extern FontEntryPtr FontFileAddEntry ( FontTablePtr table, -- cgit v1.2.3