org.apache.fop.fonts.autodetect
Class FontFileFinder
DirectoryWalker
org.apache.fop.fonts.autodetect.FontFileFinder
- FontFinder
public class FontFileFinder
extends DirectoryWalker
Helps to autodetect/locate available operating system fonts.
List | find() - Automagically finds a list of font files on local system
|
List | find(String dir) - Searches a given directory for font files
|
protected static IOFileFilter | getDirectoryFilter() - Font directory filter.
|
protected static IOFileFilter | getFileFilter() - Font file filter.
|
protected boolean | handleDirectory(File directory, int depth, Collection results)
|
protected void | handleDirectoryEnd(File directory, int depth, Collection results)
|
protected void | handleFile(File file, int depth, Collection results)
|
DEFAULT_DEPTH_LIMIT
public static final int DEFAULT_DEPTH_LIMIT
default depth limit of recursion when searching for font files *
FontFileFinder
public FontFileFinder()
Default constructor
FontFileFinder
public FontFileFinder(int depthLimit)
Constructor
depthLimit
- recursion depth limit
find
public List find()
throws IOException
Automagically finds a list of font files on local system
- find in interface FontFinder
find
public List find(String dir)
throws IOException
Searches a given directory for font files
dir
- directory to search
getDirectoryFilter
protected static IOFileFilter getDirectoryFilter()
Font directory filter. Currently ignores hidden directories.
- IOFileFilter font directory filter
getFileFilter
protected static IOFileFilter getFileFilter()
Font file filter. Currently searches for files with .ttf and .pfb extensions.
- IOFileFilter font file filter
handleDirectory
protected boolean handleDirectory(File directory,
int depth,
Collection results)
directory
- directory to handledepth
- recursion depthresults
- collection
- whether directory should be handled
org.apache.commons.io.DirectoryWalker.handleDirectory(File, int, Collection)
handleDirectoryEnd
protected void handleDirectoryEnd(File directory,
int depth,
Collection results)
directory
- the directory being processeddepth
- the current directory levelresults
- the colleciton of results objects
org.apache.commons.io.DirectoryWalker.handleDirectoryEnd
handleFile
protected void handleFile(File file,
int depth,
Collection results)
file
- file to handledepth
- recursion depthresults
- collection
org.apache.commons.io.DirectoryWalker.handleFile(File, int, Collection)
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.