From a5107a6f25b440686ac839611d7ff52c7b5f2dd8 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 28 May 2007 14:48:09 +0000 Subject: [PATCH] Discover the .otf font extension (OpenType fonts), too. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@542242 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/fonts/autodetect/FontFileFinder.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java b/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java index a19ab5a38..246fd2aed 100644 --- a/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java +++ b/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java @@ -28,6 +28,7 @@ import java.util.List; import org.apache.commons.io.DirectoryWalker; import org.apache.commons.io.filefilter.FileFilterUtils; import org.apache.commons.io.filefilter.IOFileFilter; +import org.apache.commons.io.filefilter.SuffixFileFilter; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -74,11 +75,9 @@ public class FontFileFinder extends DirectoryWalker implements FontFinder { */ protected static IOFileFilter getFileFilter() { return FileFilterUtils.andFileFilter( - FileFilterUtils.fileFileFilter(), - FileFilterUtils.orFileFilter( - FileFilterUtils.suffixFileFilter(".ttf"), - FileFilterUtils.suffixFileFilter(".pfb") - ) + FileFilterUtils.fileFileFilter(), + new SuffixFileFilter(new String[] {".ttf", ".otf", ".pfb"}) + //TODO Add *.ttc when support for it has been added to the auto-detection mech. ); } -- 2.39.5