org.apache.fontbox.util.autodetect
Class FontFileFinder

java.lang.Object
  extended by org.apache.fontbox.util.autodetect.FontFileFinder

public class FontFileFinder
extends Object

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


Constructor Summary
FontFileFinder()
          Default constructor.
 
Method Summary
 List<URI> find()
          Automagically finds a list of font files on local system.
 List<URI> find(String dir)
          Searches a given directory for font files.
 Map<String,String> getCommonTTFMapping()
          Provides a list of platform specific ttf name mappings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontFileFinder

public FontFileFinder()
Default constructor.

Method Detail

find

public List<URI> find()
               throws IOException
Automagically finds a list of font files on local system.

Returns:
List<URI> of font files
Throws:
IOException - io exception

find

public List<URI> find(String dir)
               throws IOException
Searches a given directory for font files.

Parameters:
dir - directory to search
Returns:
list<URI> of font files
Throws:
IOException - thrown if an I/O exception of some sort has occurred

getCommonTTFMapping

public Map<String,String> getCommonTTFMapping()
Provides a list of platform specific ttf name mappings.

Returns:
a font name mapping


Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.