]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Discover the .otf font extension (OpenType fonts), too.
authorJeremias Maerki <jeremias@apache.org>
Mon, 28 May 2007 14:48:09 +0000 (14:48 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 28 May 2007 14:48:09 +0000 (14:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@542242 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java

index a19ab5a382ae0f72fd8f7f0ecaaf6655e9dc93fa..246fd2aed4271cd124428c87c7fe9aeb069c6e4c 100644 (file)
@@ -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.
         );
     }