Class FontFileFinder
java.lang.Object
org.apache.fontbox.util.autodetect.FontFileFinder
Helps to autodetect/locate available operating system fonts. This class is based on a class provided by Apache FOP.
see org.apache.fop.fonts.autodetect.FontFileFinder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FontDirFinder
private static final org.apache.commons.logging.Log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
checkFontfile
(File file) Check if the given name belongs to a font file.private FontDirFinder
find()
Automagically finds a list of font files on local system.Searches a given directory for font files.private void
walk down the directory tree and search for font files.
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
fontDirFinder
-
-
Constructor Details
-
FontFileFinder
public FontFileFinder()Default constructor.
-
-
Method Details
-
determineDirFinder
-
find
Automagically finds a list of font files on local system.- Returns:
- List<URI> of font files
-
find
Searches a given directory for font files.- Parameters:
dir
- directory to search- Returns:
- list<URI> of font files
-
walk
walk down the directory tree and search for font files.- Parameters:
directory
- the directory to start atresults
- names of all found font files
-
checkFontfile
Check if the given name belongs to a font file.- Parameters:
file
- the given file- Returns:
- true if the given filename has a typical font file ending
-