Class FontFileFinder

java.lang.Object
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 Details

    • FontFileFinder

      public FontFileFinder()
      Default constructor.
  • Method Details

    • 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 - thrown if an I/O exception of some sort has occurred
    • 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