Class FontFileFinder


  • public class FontFileFinder
    extends java.lang.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

      Constructors 
      Constructor Description
      FontFileFinder()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.net.URI> find()
      Automagically finds a list of font files on local system.
      java.util.List<java.net.URI> find​(java.lang.String dir)
      Searches a given directory for font files.
      java.util.Map<java.lang.String,​java.lang.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 java.util.List<java.net.URI> find()
                                          throws java.io.IOException
        Automagically finds a list of font files on local system.
        Returns:
        List<URI> of font files
        Throws:
        java.io.IOException - thrown if an I/O exception of some sort has occurred
      • find

        public java.util.List<java.net.URI> find​(java.lang.String dir)
                                          throws java.io.IOException
        Searches a given directory for font files.
        Parameters:
        dir - directory to search
        Returns:
        list<URI> of font files
        Throws:
        java.io.IOException - thrown if an I/O exception of some sort has occurred
      • getCommonTTFMapping

        public java.util.Map<java.lang.String,​java.lang.String> getCommonTTFMapping()
        Provides a list of platform specific ttf name mappings.
        Returns:
        a font name mapping